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

Help with navigator object

Status
Not open for further replies.

randyQ

IS-IT--Management
Apr 26, 2001
117
US
What is wrong with this script:

<script>
<!--
function smartclick()
if (navigator.appName==&quot;Netscape&quot;&&parseFloat(navigator.appVersion)>=4.0)
{
window.location=&quot;else
window.location=&quot;}
//-->
</script>

Frontpage tells me that there is an error in Line 15 at Char 1, and that it is expecting a '{'. Line 15 is the &quot;else&quot; statement in the code above. I want our netscape users to go to a slightly different webpage when they click on the link. Here is the link code I am using, just in case:

<a href=&quot;javascript:smartclick()&quot;>Go Back to Main Page</a>

So, netscape users go to staff.html, and IE users go to staff. Why do I get an error with my code? I got the code from Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top