Passing Variable to Parent
Posted: Fri Nov 05, 2004 5:11 pm
I've searched high and low and can not find exactly what I'm looking for so I'm hoping someone here can put me in the right direction. I have a parent page that is an application when the user types in a phone number it opens a popup window letting them know if the phone number exists in a table. This works fine now I want to be able to tell reject the application by placing the value "Rejected" in the status field on the parent window. I also do not want to lose any information already entered on the form.
On the parent form the code I have is
On the child window I have
Should I be using different code to do this or can I add some code to this? Any help is greatly appreciated.
On the parent form the code I have is
Code: Select all
<?php
<input type="text" name="txtHomePhone" tabindex="24" value="<?php echo($homePhone); ?>" onBlur="popUpWindow('primus_checkPhone.php?phone=',450,150,150,150); return true;">
?>Code: Select all
<script language="javascript">
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
var phone=document.primus.txtHomePhone.value;
if(popUpWin)
{
if(!popUpWin.closed) popUpWin.close();
}
popUpWin = open(URLStr+phone, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
</script>Code: Select all
<?php
$homePhone=$_GET["phone"];
$sql="SELECT * from tblTPV WHERE BTN='".$homePhone."' AND entered='No' AND Status='Y';";
$result=mysql_query($sql,$cnx);
if (mysql_num_rows($result)>0){
echo ("TPV Exists"); }
else {
echo ("TPV Doen't Exist"); }
echo '<br><br>';
echo '<input type=button value="Close Window" onClick="javascript:window.close();"> ';
?>