SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Opening a window with a form

    Hi all,

    Let me say first that I know pretty much nothing about JavaScript. So, please provide code and explainations.

    I have a form, and when the user clicks the submit button, I would like a new window to pop up with of a certain size (no scrollbars or anything like that) with the form's action attribute.

    Any help is greatly appreciated.

    -Corbb
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Corrb,

    If you are running webmaster sites, perhaps you should learn some javascript...
    http://www.htmlgoodies.com -- the javascript tutorial

    Since you didn't provide any sort of information on your form & its action, it would be somewhat presumptious to advise you how to accomplish what you want to do other than say use window.open(url,"", features) Of course, if you are using cgi with your form, you might want to open the window from there.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    SitePoint Addict
    Join Date
    May 2001
    Location
    USA
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To open a new window when the submit button is clicked, use this code for the <form> tag:

    Code:
    <form action="form action goes here" method="type post or get here" target="_blank">
    Notice the "target" part of the tag. This will open a new window when the form is submitted. Please note that this will just open a new window, not remove scroll bars or set the size of the window.

  4. #4
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help guys. I'm reading through Joe Burns' Java Tutorial now.

    -Corbb
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!


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
  •