Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Saj
    Saj is offline
    Regular Coder
    Join Date
    Feb 2003
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    window.open debug error

    Hi.

    Can any of you spot whats wrong with this script?

    Code:
      <script type="text/javascript">
       function load_popup {
        window.open("images/demo.swf", "Demo", "width=832,height=556");
        self.close();
       }
      </script>
     </head>
     <body onload="javascript:load_popup()">
    MS Script debugger picks on the onload="javascript:load_popup()" and something else, though I have no idea what since it didn't highlight anything.

    Help would be appreciated.

    Saj
    - Saj

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would normaly just write

    <body onload="load_popup();">

  • #3
    Saj
    Saj is offline
    Regular Coder
    Join Date
    Feb 2003
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    And it still didn't work...I tried that before as well.

    Its still picking on something, even after I take out the self.close(), so I have no idea.

    BTW, thanks for the very quick response.
    - Saj

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I must have been asleep lol anyways this works
    Code:
     
    <html>
    <head>
      <script type="text/javascript">
       function load_popup() {
        window.open("images/demo.swf", "Demo", "width=832,height=556");
        self.close();
       }
      </script>
     </head>
     <body onload="load_popup();">
     </body>
     </html>

  • #5
    Saj
    Saj is offline
    Regular Coder
    Join Date
    Feb 2003
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just to prove my stupidity.....I forgot the () after load_popup

    I can't believe I did that though

    Thanks for your help...
    - Saj


  •  

    Posting Permissions

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