Hi,
as I said, I'm trying to send a usercode variable via a submit button from my from to an IFRAME, so when the frame reload my PHP fonction is executed and print the returned values in the IFRAME.
This is my form:
<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()"/>
<p>
<select name="usrLstCode">
</select>
<input type="button" value="Show information" onClick="document.frames['frmUsrInfo'].location.href='http://www.htmlforums.com/archive/index.php/TraitementInfo.php?usrCode='+document.formUsrMod.usrLstCode.value;">
</p>
</form>
This is my IFRAME:
<iframe src=http://www.htmlforums.com/archive/index.php/"TraitementInfo.php"
name="frmUsrInfo"
width="100%" height="260"
scrolling="no"
align="left">
</iframe>
And this is the code of my PHP page called by the frame:
$usrid = $_GET["usrCode"];
if (!$conn = pg_connect($cfgConn)) { bugFromPG($conn); }
$infoUsr = readUserInfoFromLDAP($usr_id);
<form name="IFRAME">
<fieldset style="width: 752; height: 203; padding: 2">
<legend><b>Informations sur l'utilisateur sé—ÂÂ榚ctionn?lt;/b></legend>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="95%" id="AutoNumber13">
<tr>
<td width="23%"> Code:</td>
<td width="177%"> <input type="text" name="usrCode" size="20"></td>
</tr>
<tr>
<td width="23%"> Pré—ÂÂæ°m:</td>
<td width="177%"> <input type="text" name="usrPrenom" size="20" value="<?echo $infoUsr[1]?>"></td>
</tr>
<tr>
<td width="23%"> Nom:</td>
<td width="177%"> <input type="text" name="usrNom" size="20" value="<?echo $infoUsr[0]?>"></td>
</tr>
</fieldset></form>
Any help would be highly appreciate since I'm stucked on this one for a while now. Thanks everybody
Frankhi and welcome to the forums.
first you need a action in the form. just give it the page you want it to post to and all is well.
as I said, I'm trying to send a usercode variable via a submit button from my from to an IFRAME, so when the frame reload my PHP fonction is executed and print the returned values in the IFRAME.
This is my form:
<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()"/>
<p>
<select name="usrLstCode">
</select>
<input type="button" value="Show information" onClick="document.frames['frmUsrInfo'].location.href='http://www.htmlforums.com/archive/index.php/TraitementInfo.php?usrCode='+document.formUsrMod.usrLstCode.value;">
</p>
</form>
This is my IFRAME:
<iframe src=http://www.htmlforums.com/archive/index.php/"TraitementInfo.php"
name="frmUsrInfo"
width="100%" height="260"
scrolling="no"
align="left">
</iframe>
And this is the code of my PHP page called by the frame:
$usrid = $_GET["usrCode"];
if (!$conn = pg_connect($cfgConn)) { bugFromPG($conn); }
$infoUsr = readUserInfoFromLDAP($usr_id);
<form name="IFRAME">
<fieldset style="width: 752; height: 203; padding: 2">
<legend><b>Informations sur l'utilisateur sé—ÂÂ榚ctionn?lt;/b></legend>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="95%" id="AutoNumber13">
<tr>
<td width="23%"> Code:</td>
<td width="177%"> <input type="text" name="usrCode" size="20"></td>
</tr>
<tr>
<td width="23%"> Pré—ÂÂæ°m:</td>
<td width="177%"> <input type="text" name="usrPrenom" size="20" value="<?echo $infoUsr[1]?>"></td>
</tr>
<tr>
<td width="23%"> Nom:</td>
<td width="177%"> <input type="text" name="usrNom" size="20" value="<?echo $infoUsr[0]?>"></td>
</tr>
</fieldset></form>
Any help would be highly appreciate since I'm stucked on this one for a while now. Thanks everybody
Frankhi and welcome to the forums.
first you need a action in the form. just give it the page you want it to post to and all is well.