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();"> ';
?>