Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browsers Firefox Vs IE, code works in IE but not Firefox

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
0
36
US
If I click the “new” button in Internet Explore it works fine but in Firefox nothing happens. Is there a work around or am I stuck forcing my users to use IE. I have IE6 still not sure if this works in newer versions of IE 7 or 8.


<script Language="VBScript"><!--
Sub btnNew_Onclick
document.FrontPage_Form1.txtDate.value = now
document.FrontPage_Form1.txtCompanyName.focus
end sub
--></script>


DougP
[r2d2] < I Built one
 
??? firefox does not support client-side vbscript!
 
So how do I do the above using this
<%@ Language=VBScript %>
<%
.txtDate = Todays date
.txtCompanyName. set focus
%>

or do I need to learn and use .NET?

That's probably why Firefox is more secure than IE.

DougP
[r2d2] < I Built one
 
The closest javascript renderment, apart from some detail on the date-time format, is this.
[tt]
<script type="text/javascript">
function x() {
document.FrontPage_Form1.txtDate.value = (new Date()).toString();
document.FrontPage_Form1.txtCompanyName.focus();
}
</script>
[/tt]
And the button: am not sure what it is scripted. If it is a form field button type, it is this.
[tt]
<input type="button" name="btnNew" id="btnNew" onclick="x()" />
[/tt]
If it is a plain button tag, it could be this.
[tt]
<button id="btnNew" onclick="x()">some description</button>
[/tt]
Relating to security? that is exercising the faculty of imagination way too hard.
 
just to add to tsuji's post.

VB/VB Script only really work in a totally IE centric world. (A company Intra-net.)

I am a VB Programmer, but find myself needing to do things at the client side - the web browser. This has caused me to learn javascript (which is different to jscipt - and firefox doesn't understand jscript)

Once you get used to its rules (Semi colon at the end of most lines. Squiggly brackets etc) it is pretty easy. I found loops and if's to be the hardest concepts to wrap my limited brain around.

However.. IT is very powerful, and things that had caused me to write Ajax methods in dot net, now I do in JavaScript - (Or most specifically I have been using the JQuery library to accelerate Client side development-which uses JavaScript)

When ever I have a problem, I go to or

The top link provides a great edit and play environment and the bottom is documentation and source code for jquery. (A free download)

- Also - Firefox isn't really that much more secure than IE. INfact unless people are updating it, it is probably less secure. IE gets the weekly update from MS, so as soon as a vulnerability is found, it gets plugged. Firefox doesn't get that sort of treatment. (This should start a browser love/hate war :) - personally I hate the way firefox will often be the only browser that doesn't display a page in an anticipated way, but then sometimes it is IE that falls into that trap, and IE6... spawn of satin.. (crap now I sound like a firefox person ) hahaha

It is kind of like Linux. If you hate Microsoft - it is the best product in the world.

My 1c


HTH

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top