Hi all,
I'd like if anyone can help me to figure out how to pass data from a field of a form to an IFRAME. Right now I have a page with a list of user and when I click on the submit button, I'd like to load the IFRAME (which execute a SQL query via a PHP function to return some informations on the selected user) and put the informations back in the designated fields of my form.
So basicaly I'm trying to take a value from my form ans send it to the frame, execute the query and return the info gathered to the form to print it.
My IFRAME is already created as follow:
<iframe src="TraitementInfo.php"
name="frmUsrInfo"
width="100%" height="250"
scrolling="no"
align="left">
</iframe>
And my form containing the listitem that I want to pass to the frame and the Submit button:
<form name="formUsrMod" method="GET" action="" target="frmUsrInfo">
<input name="usrCode" maxlength="10" style="width:150;height:23" size="30"/>
<input type="button" value="Add" onClick="process();"> <input type="Button" value="Remove" onclick="removeItem()"/>
<select name="usrLstCode" size=4 onchange="moveOver();"></select>
<input type="submit" value="Show information" onClick="document.frames["frmUsrInfo"].location.href='TraitementInfo.php?usrCode='+document.formUsrMod.usrCode.value;">
</form></td>
Thanks all. Frank
I'd like if anyone can help me to figure out how to pass data from a field of a form to an IFRAME. Right now I have a page with a list of user and when I click on the submit button, I'd like to load the IFRAME (which execute a SQL query via a PHP function to return some informations on the selected user) and put the informations back in the designated fields of my form.
So basicaly I'm trying to take a value from my form ans send it to the frame, execute the query and return the info gathered to the form to print it.
My IFRAME is already created as follow:
<iframe src="TraitementInfo.php"
name="frmUsrInfo"
width="100%" height="250"
scrolling="no"
align="left">
</iframe>
And my form containing the listitem that I want to pass to the frame and the Submit button:
<form name="formUsrMod" method="GET" action="" target="frmUsrInfo">
<input name="usrCode" maxlength="10" style="width:150;height:23" size="30"/>
<input type="button" value="Add" onClick="process();"> <input type="Button" value="Remove" onclick="removeItem()"/>
<select name="usrLstCode" size=4 onchange="moveOver();"></select>
<input type="submit" value="Show information" onClick="document.frames["frmUsrInfo"].location.href='TraitementInfo.php?usrCode='+document.formUsrMod.usrCode.value;">
</form></td>
Thanks all. Frank