SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Popup Window Problems

    Why isn't this working? Help is much appreciated.

    Head:
    Code:
    <script language="javascript" type="text/javascript">
    <!--
    function openwindow(file,title)
    {
    	popupwin = window.open(file,title,config='scrollbars=yes,resizable=no,width=760,height=600')
    }
    //-->
    </script>
    Body:
    Code:
    <p><form action="" method="post">
    <input type="button" name="menu" value="Click Here" onclick="openwindow(menu_1.php','Menu')" />
    <form></p>
    EDIT:Nevermind -- found the culprit as soon as I glanced at this post.
    Last edited by Aes; Dec 23, 2001 at 12:18.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  2. #2
    SitePoint Addict
    Join Date
    May 2001
    Location
    USA
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try removing the "popupwin =" part from your JavaScript function. You probably don't need this, as the window won't be executed anyways until the function itself is executed. Your <body> code seems to be ok.

    Let me know if it still doesn't work.

    Hope this helps!

  3. #3
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I need that so that I can open different pages with only one JavaScript function.

    The problem was the missing ' in the code above; look in the body section. Thanks anyway though.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.


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
  •