Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Submit button new window

Options
  • 15-12-2004 5:41pm
    #1
    Closed Accounts Posts: 546 ✭✭✭


    Hi.

    My site has an e-mail logon form on the main page. The logon form is in an iframe & when a user logs on, the webmail page is opened within the iframe. I know with a standard url you can add <a href="www.yourpage.com" target="whatever"> and it'll open the link in a fresh window.

    How do I do that with an input button?

    Here's my code so far:

    <input class="btn" type="submit" value="login" name="do.login" />

    Thanks.


Comments

  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m


    do you want the button to open a new window, or over-writing the parent window? and are the variables being passed to this new window?


  • Closed Accounts Posts: 546 ✭✭✭exactiv


    Ph3n0m wrote:
    do you want the button to open a new window, or over-writing the parent window? and are the variables being passed to this new window?
    Thanks for the swift reply!

    Yes, I want the button to open a new window. I'm not sure if the variables should be passed onto the new window. It's a logon for a webmail server. I can post the code for the whole page if you need.

    Thanks.


  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m




  • Closed Accounts Posts: 2,525 ✭✭✭JustHalf


    You should think about the impact this has on the accessability of your site, and if opening a new window is entirely necessary.

    I'm guessing you've come to this problem because the flow is:

    1. Display login page
    2. Open new window
    3. Process login via new window

    If so, you should think about:

    1. Display login page
    2. Process login via current window
    3. Open new window (sessions etc should now be set up already).

    This is easier to do and less likely to break cross-browser.

    You should try to avoid relying on Javascript if at all possible.


  • Closed Accounts Posts: 546 ✭✭✭exactiv


    Thanks Ph3n0m. That worked a treat.


  • Advertisement
Advertisement