Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

Pop-up Window - form post to parent window


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,

On May 20, 9:53 am, carrajo <carraz@gmail.com> wrote:

> 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;

On May 20, 10:53 am, carrajo <carraz@gmail.com> wrote:

> 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 .
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc