Avatar of lulu50
lulu50
Flag 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
jQueryJavaScriptJScript

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Julian Hansen

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
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

lulu50

ASKER
I am using coldfusion can I use the php code above?
Julian Hansen

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.
Your help has saved me hundreds of hours of internet surfing.
fblack61
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.
lulu50

ASKER
Thank you
Julian Hansen

You are welcome - thanks for the points.

Did you manage to get it to work?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.