SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    East Side
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JavaScript in Netscape

    I am running this script as a dummy login application:

    <script>
    function getit() {
    if (document.former.IDS.value == "crosby") {location.replace('crosby/profile.html')}
    else if (document.former.IDS.value == "sample"){location.replace('sample/profile.html')}
    else if (document.former.IDS.value=="drest"){location.replace('drest/profile.html')}
    else if (document.former.IDS.value=="east"){location.replace('east/profile.html')}
    else if (document.former.IDS.value=="noonan"){location.replace('reporting/profile.html')}
    else {location.replace('errorlogin.html')}

    }
    </script>

    <a href="#"><img src="images/signin_go.gif" onClick="getit()" border="0" width="66" height="18"></a>

    It works fine in IE but keeps reloading the same page when I attempt it in Netscape. What could be the problem?

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    East Side
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Nevermind...

    Found out the solution. Seems that Netscape does not understand the getit() command in an image tag... you have to write it like this (if anyone is interested!):

    <a href="#" onClick="getit();return false;"><img src="signin_go.gif"></a>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •