Pop-up Window - form post to parent window

C

carrajo

Hello,

What would be the correct javascript code to do the following:

- Open a pop-up window ( a file called form.html. form.html post to a
script )
- When form.html is submitted I would like it to submit to the parent
window not stay within the pop-up window.

Any help would be greatly appreciated.

Thanks,
 
S

Skye Shaw!@#$

What would be the correct javascript code to do the following:

- Open a pop-up window ( a file called form.html. form.html post to a
script )
- When form.html is submitted I would like it to submit to the parent
window not stay within the pop-up window.

Have a look at the window object and the document object's forms
collection.
In the desired event handler, you should do something like this in
the child:

function bs()
{
window.opener.document.forms['form-name'].submit();
window.close();
return false;
}
 
S

scripts.contact

What would be the correct javascript code to do the following:

- Open a pop-up window ( a file called form.html. form.html post to a
script )
open('form.html','myform');

- When form.html is submitted I would like it to submit to the parent
window not stay within the pop-up window.

set the target of the form to "_top" and add a submit event to close
the window .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top