A JavaScript newbie question

Discussion in 'Software' started by Computer Acolyte, Jul 10, 2007.

  1. Computer Acolyte

    Computer Acolyte Private First Class

    Internet Explorer doesn't like this for some reason, Firefox and Opera do.
    It's a JavaScript pop up thingy, and IE gives me an invalid argument error, referring to the window.open line.

    This is in the Head section:
    Code:
    <script type="text/javascript" language="JavaScript">
    
    function PopUp(url){
    window.open(url, "John 5 extra info", "width=750, height=500, scrollbars=yes, resizable=yes")
    }
    
    </script>
    And this is in the body:
    Code:
    <a href="javascript:PopUp('page.html')">here</a>
    I tried searching the web but I can't figure out what's wrong. Thanks in advance.
     
  2. matt.chugg

    matt.chugg MajorGeek

    The window.open line is missing a semicolon at the end.

    Code:
    <script type="text/javascript" language="JavaScript">
    
    function PopUp(url){
    window.open(url, "John 5 extra info", "width=750, height=500, scrollbars=yes, resizable=yes")[B][COLOR="Red"];[/COLOR][/B]
    }
    
    </script>
    
     
  3. Computer Acolyte

    Computer Acolyte Private First Class

    Still doesn't work.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds