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.

Javascript Question

  • 19-07-2002 04:22PM
    #1
    Closed Accounts Posts: 22


    Hello all
    Quick question if you wouldnt mind helpin coz my brain is fried !

    Home page with a link which opens a popup .. no bother
    In the popup is a form which is to be submitted to a new page in the original window (not its self)

    I tried this but it just keeps opening a new window
    <form name=form1 action = "http://www.url.com/newpage.php" target="parent" method = "POST">
    

    .. any ideas or good javascript forums ?

    Thanks

    Al


Comments

  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    Probably easiest way would be:

    If you are using POST:

    Transfer all the details to a hidden form on the target window, and then submit it.

    If you are using GET:

    Work out the URI that would be generated and then set the target window's location to it.

    There may be an easier way depending on what else is going on. But then again the whole concept of pop-ups, javascript dependent forms and so on is pretty crap. It's just really bad UI.


  • Closed Accounts Posts: 22 alfoxy


    Hello thanks for the reply sorry its been so long ...

    excuse my ignorance but what is a URI ?

    Thanks

    Al


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Universal Resource Identifier.

    eg.

    file://c:\whatever
    ftp://site/location/file


    You could try the webmaster forum, but I'd take a guess and say you should use the target name of the window you want to open into.


  • Closed Accounts Posts: 22 alfoxy


    thanks i just figured it out. i used
    window.name = "whatever";
    then set the target to whatever

    Thanks a million for your help and quick responces

    Al


Advertisement