Sending data of a form to an IFRAME to execute PHP function ?

liunx

Guest
Hi,<br />
<br />
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.<br />
<br />
This is my form:<br />
<br />
<form name="formUsrMod" method="GET" action="" target="frmUsrInfo"><br />
<input name="usrCode" maxlength="10" style="width:150;height:23" size="30"/><br />
<input type="button" value="Add" onClick="process();"> <input type="Button" value="Remove" onclick="removeItem()"/><br />
<p><br />
<select name="usrLstCode"><br />
</select><br />
<input type="button" value="Show information" onClick="document.frames['frmUsrInfo'].location.href='http://www.webdeveloper.com/forum/archive/index.php/TraitementInfo.php?usrCode='+document.formUsrMod.usrLstCode.value;"><br />
</p><br />
</form><br />
<br />
<br />
This is my IFRAME:<br />
<br />
<iframe src=http://www.webdeveloper.com/forum/archive/index.php/"TraitementInfo.php"<br />
name="frmUsrInfo"<br />
width="100%" height="260"<br />
scrolling="no"<br />
align="left"><br />
</iframe><br />
<br />
<br />
And this is the code of my PHP page called by the frame:<br />
<br />
$usrid = $_GET["usrCode"];<br />
if (!$conn = pg_connect($cfgConn)) { bugFromPG($conn); }<br />
$infoUsr = readUserInfoFromLDAP($usr_id);<br />
<br />
<form name="IFRAME"><br />
<fieldset style="width: 752; height: 203; padding: 2"><br />
<legend><b>Informations sur l'utilisateur s闁榚ctionn?lt;/b></legend>&nbsp;<br />
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="95%" id="AutoNumber13"><br />
<tr><br />
<td width="23%">&nbsp;Code:</td><br />
<td width="177%">&nbsp;<input type="text" name="usrCode" size="20"></td><br />
</tr><br />
<tr><br />
<td width="23%">&nbsp;Pr闁歰m:</td><br />
<td width="177%">&nbsp;<input type="text" name="usrPrenom" size="20" value="<?echo $infoUsr[1]?>"></td><br />
</tr><br />
<tr><br />
<td width="23%">&nbsp;Nom:</td><br />
<td width="177%">&nbsp;<input type="text" name="usrNom" size="20" value="<?echo $infoUsr[0]?>"></td><br />
</tr><br />
</fieldset></form><br />
<br />
<br />
<br />
Any help would be highly appreciate since I'm stucked on this one for a while now. Thanks everybody<br />
<br />
Frank<!--content-->
 
Back
Top