SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    2,617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JavaScript pop-up, very simple problem...

    I have this link to a pop-up window, but I can't get it to open a pop-up window for me. It either opens nothing, or when I alter the code a bit, opens a blank page in the first window, and not a pop-up.

    I use this JavaScript code:

    Code:
    function popupwin(url,w,h){
    newwin=window.open(url,'popupwin','width=' + w + ',height=' + h + ',resizable');
    newwin.focus();
    return false;
    }
    And I use this code to call on the pop-up:

    Code:
    <a class=joke href="humour/joke.php" onClick="return popupwin('humour/joke.php', 300, 450">Click here for the Joke of the Day</a>
    Thanks in advance for the help with this problem. As you can see, I am far from being a JavaScript Guru .

  2. #2
    pg for mild peril cow's Avatar
    Join Date
    Mar 2000
    Location
    nevada, usa
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm, odd. i'm using ie5 and that code works for me. you did omit a ")" from the link, maybe that was the prob?
    "There's no justice like angry mob justice!" --Seymour Skinner

  3. #3
    SitePoint Wizard
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    2,617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, I wonder how I could make that slip my mind. Thanks anyway for showing the flaw to me. This could have taken me days, I always think problems seem difficult, and then they turn out to be very basic .


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
  •