SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Bethesda, MD
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy simple question...

    This works, but I get an error everytime it runs. I have NO idea what's wrong with it. Does anybody see what I'm missing?

    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript">
    function randWin(url) {
    var popWin = window.open(url,'','width=500, height=500');

    popWin.document.write()
    popWin.document.close()
    }
    </SCRIPT>
    </head>
    <body>
    <a href='javascript:randWin("http://www.google.com/")' onClick='image("http://www.google.com/");return false'>open</a>
    </body>
    </html>

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could it have something to do with the following line of code?

    Code:
    <a href="java script:randWin("http://www.google.com/" )" onClick='image("http://www.google.com/" );return false'>open</a>
    Change it to:

    Code:
    <a href="JavaScript:randWin("http://www.google.com/" )" onClick='image("http://www.google.com/" );return false'>open</a>
    and see if it still generates the errors.

    Hope this helps

    -Sam
    Sam Hastings

  3. #3
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Bethesda, MD
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Devilware.net
    Could it have something to do with the following line of code?

    Code:
    <a href="java script:randWin("http://www.google.com/" )" onClick='image("http://www.google.com/" );return false'>open</a>
    Change it to:

    Code:
    <a href="JavaScript:randWin("http://www.google.com/" )" onClick='image("http://www.google.com/" );return false'>open</a>
    and see if it still generates the errors.

    Hope this helps

    -Sam
    thanks, but that seemed to make it not work at all. after you posted it, i do think that i found at least part of the problem: onClick='image("http://www.google.com/" ). the "image" shouldnt be there and has been changed. im still getting an error though for some reason.


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
  •