This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

After submitting form - auto close


  1. lydia
    Member

    hi yuniar,

    I see from a previous post that you were able to do this in IE. Has it changed and is it now possible in Firefox.

    (Are you sure you want to do this? Your user won't have any clue what has happened if you do so.

    If you really sure, edit your embed.php and view.php file, around line 31 you will find this code:

    if($submit_result['status'] === true){

    Right under that line , insert this code:

    echo "<script type=\"text/javascript\">top.window.opener = top;top.window.open('','_parent','');top.window.close();</script>";
    exit;

    That should close your window immediately.

    However, the code above won't work in Firefox. Since I can't seem to find any javascript code to close Firefox tab.

    Anybody know? )

    thanks
    Lydia

    Posted 14 years ago #
  2. yuniar

    I've tested using the latest version of Firefox (3.6.4)
    The javascript seems to be working when you display the form in a standalone mode (view.php).

    However, when you embed the form (using the iframe) it doesn't seem to work.


    MachForm Founder

    Posted 14 years ago #

RSS feed for this topic

Reply