SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Formerly known as RockNRollPig Shpigford's Avatar
    Join Date
    Dec 2002
    Location
    Denver, CO
    Posts
    2,877
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how would i make the "submit" button open a new window?

    As the question says...i want my "submit" button in my form to open a new window instead of go to another page...any ideas?

  2. #2
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I am guessing this would be done using some Javascript for the onClick event.

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Hartmann
    I am guessing this would be done using some Javascript for the onClick event.
    If you're working in XHTML strict mode yes. However, if you're going Transitional/loose, this will work:
    HTML Code:
    <form target="_blank" action="page.html">

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also:

    1) Set the <form....target="some_window_name".....> to a specific window name.
    2) Call a function: <form.....onsubmit="return function_name()">
    3) In that function, open a blank window with that same name: window.open('about&#58;blank', 'some_window_name', 'features...');
    4) Put return true; at the end of the function.

    This opens a targetable window - you can configure it as you like - and the form will open in it. Same validity situation as above.
    ::: certified wild guess :::


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
  •