SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member
    Join Date
    Sep 2000
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey there,
    I have a little problem, ok here it is:
    what i need is when someone presses the submit button i need it to popup in a new window and i want to specify the size of the new window....

    the form i need is located at: htttp://www.napsterportal.com

    when someone presses the search button i need it to popup in a new window and in a certain size....
    anyone know the script for that, or how to do that?

    thanx

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    Code:
    <script language="JavaScript"type="text/javascript">
    <!--
    function openWindow(url,w,h){
    var winame='popup';
    popupWin=window.open(
    url,winame,'scrollbars,menubar,resizeable,'+'width='+w+',height='+h);
    }
    // -->
    </script>
    
    <form target='popup' onSubmit="this.window.openWindow('blank.html','600','400');" ...>
    ...
    </form>
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference


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
  •