Link to home
Start Free TrialLog in
Avatar of chencc77
chencc77

asked on

pop up a window and auto submit

Hi.
I am using ASP to create a web application. let say i have main.asp and child.asp. i use 'function OpenWindow' as follow to pop-up child.asp from main.asp.

//put in main.asp
function OpenWindow(){

window.open("child.asp","A","width=500,height=600,status=no,resizable=yes,top=200,left=200");
}

And in child.asp, i have function 'assignValue' to past in some value to main.asp (it work fine). my question is how do i submit the main.asp when child is close. If i use window.opener.location.reload(true); It is not submit, that mean i canot use 'request.form' to get the component value. am i right??

function assignValue(){
     // enter some value....

     window.opener.location.reload(true);
//      window.opener.location.submit;    
     window.close();

}
ASKER CERTIFIED SOLUTION
Avatar of knightEknight
knightEknight
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or:

window.opener.document.forms[0].submit();
Avatar of chencc77
chencc77

ASKER

Ok , thank you. ^-^