Web Analytics Made Easy -
StatCounter Works in IE..but not in Netscape? - CodingForum

Announcement

Collapse
No announcement yet.

Works in IE..but not in Netscape?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Works in IE..but not in Netscape?

    Hello all...

    I'm wondering about the code below...I wrote it in IE, but as it's javascript, isn't it supposed to work in Netscape too?

    Or is my code wonky?

    Code:
    <center>
    
    <a NAME="closeButton" ONCLICK="closeButton">
    
    <img src="images2/duckyCLOSE.jpg" width="161" height="49" border="0">
    </a>
    
    <SCRIPT FOR="closeButton" EVENT="onclick" LANGUAGE="vbscript">
      Window.close
    </SCRIPT>
    </center>
    Can anyone offer up what I've done wrong?

    Jim Rudnick

  • #2
    No need for using the proprietary for attribute in script, nor using VBScript, nor even using <script>:

    <a name="closeButton" onclick="window.close()">

    K.I.S.S. (Keep it simple, stupid )
    jasonkarldavis.com

    Comment


    • #3
      Uh oh!!! SOMEBODY DIDN'T CLOSE THEIR ANCHOR TAG !!!
      -Obiwan Jabroni
      May the Schwartz be With You

      Comment


      • #4
        Originally posted by ObiwanJebroni
        Uh oh!!! SOMEBODY DIDN'T CLOSE THEIR ANCHOR TAG !!!
        I think you missed the point? The closing tag for the anchor didn't have to be changed, and since it contained HTML, no need to post unmodified code. Maybe you didn't notice how I didn't include any child nodes with it either? Nor a valid document structure to contain it in?
        jasonkarldavis.com

        Comment


        • #5
          i think he was joking, dude.
          bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

          i am a loser geek, crazy with an evil streak,
          yes i do believe there is a violent thing inside of me.

          Comment


          • #6
            Originally posted by joh6nn
            i think he was joking, dude.
            Notice the at the end of my reply?

            Anyway, please keep this on topic.
            jasonkarldavis.com

            Comment

            Working...
            X