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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape/IE navigation

Status
Not open for further replies.

Layton

Programmer
Nov 29, 2001
15
US
I have gotten my page to work but don't quite understand what the difference is and would like an answer.

I have taken over a project that was basicly written for IE only. Now it has to work in at least a later version of Netscape. (6.2 and up)
The code on a navigation button was:

<INPUT TYPE=&quot;BUTTON&quot; NAME=&quot;btnNext&quot; VALUE=&quot;Next Page&quot; onClick=&quot;javascript:window.navigate('ACHList.asp?CURPAGE=<%=iNext%>&rdoDate=<%=rdoDate%>&lstMonth=<%=lstMonth%>&txtDate=<%=txtDate%>&txtFrom=<%=txtFrom%>&txtTo=<%=txtTo%>');&quot;>

With this code it worked in IE but just sat there in Netscape.
I changed the begining of the code to read:

onClick=&quot;javascript:window.location=

So, simply put, I am using location instead of navigate.

Why did one work and not the other?

Thanks,
 
window.navigate doesnt mean anything to Netscape browsers, this problem is a well known one called cross browser scripting. The navigate method may only be supported by IE (even though I did not know you could say window.navigate), if this is the case this script will only work in IE.
 
It depends on what is supported by the various browsers. Each browser has a seperate javascript parser, and differant javascript document object models. This means you will find quite a number of things that work one way under netscape and another under IE. The wonders of client side scripting. In many cases you may even find it necessary to develop two portions of javascript and do a browser detect. It's one of the many cross borwser issues that haven't been cleared up. Although current polling by sites such as amazon suggest that Netscape use is getting smaller, less than 5% of the total browser use. I personally have noticed that it is most used in academic settings among people who get used to their tools working a certain way and don't wish to change to a new set. (I'm not bitter...)
-Tarwn ------------ My Little Dictionary ---------
Extreme Programming - (1)Trying to code before my second cup of coffee. (2) While(1){ Ctrl+C; Ctrl+V; }
FAQ - Web-ese for &quot;Forget Asking Questions, I am to busy&quot; :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top