Link to home
Create AccountLog in
Avatar of lulu50
lulu50Flag for United States of America

asked on

submit

Hi,

I have a parent window and a child window.

How can I have the child window submit the parent window.

so, I have a button on the child window when the user click on it should confirm
if they want to continue to submit the parent form - yes or no.  

if yes then the child window should submit the parent window then close the child window.

if no then just close the child window.

Thanks,
Lulu
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of lulu50

ASKER

julianH,


both forms are on the same domain.

I am not getting error but it's not submitting the form

I get this message: "form not submitted"

//this is on the child form

$('#SubmitForm').click(function() {
 	window.opener.document.LogEntryFrm.submit();
    window.close();
    return false;
  });

 <input type="button" id="SubmitForm" name="SubmitForm" value="Submit" />

Open in new window



what is this part?
where would I put it?

<pre>
<?php
if ($_POST) print_r($_POST);
else echo "Nothing submitted";
?>
</pre>

Open in new window

Avatar of lulu50

ASKER

I am using coldfusion can I use the php code above?
I am using coldfusion can I use the php code above?
The PHP is not part of the solution - it is just there to demonstrate that the form was actually posted. You need to point the form submit to whatever form processing script you are using.
Avatar of lulu50

ASKER

the LogEntryFrm is on the parent window
so, I have it like this
      window.opener.document.LogEntryFrm.submit();
but, I still can't get it to submit the parent form.
Avatar of lulu50

ASKER

Thank you
You are welcome - thanks for the points.

Did you manage to get it to work?