Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Submit button new window

  • 15-12-2004 05:41PM
    #1
    Closed Accounts Posts: 538 ✭✭✭


    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: 538 ✭✭✭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: 538 ✭✭✭exactiv


    Thanks Ph3n0m. That worked a treat.


  • Advertisement
Advertisement