i created a popup window and i want to pass just a single value in my form to the child window ..
any idea how to do it?
my coding is like this
—- PARENT WINDOW —-
function open_win(){
window.open(‘calculate.php’, ”, ‘left = 103, top = 72, width=400,height=300,scrollbars=no,menubar=no,location=no,status=yes,resizable=yes,toolbars=no’);
}
<form name=”jobprofile” action=”” method=”post”>
<input type=”text” name=”txtsupervisor” value=””>
<input type=”button” onclick=”open_win();” value=”Browse”>
</form>
— child window / calculate.php —
function passvariable(){
window.opener.jobprofile.txtsupervisor.value = supervisorform.txtsupervisor.value;
window.close();
}
<FORM METHOD=POST ACTION=”” name=”supervisorform”>
<INPUT TYPE=”text” NAME=”txtsupervisor” value=””>
<INPUT TYPE=”button” name=”submit” value=”submit” onclick=”passvariable()”>
</FORM>
……………….
i can pass value from child window to parent window but i wonder how to pass value from parent window to child window