cbVision and tirna
I have pasted the codes here. regAssignUser.php opens a popup files.php and then files.php close() to end data to regAssignUser.php
Code:
=================================
<!-- regAsignUser.php -->
====================================
<?php session_start(); ?>
<script type="text/javascript">
function open_files()
{
var mySearch = document.getElementById("idFile");
if(mySearch.value == ""){
alert("You Have Not Entered Anything");
}else{
window.open('files.php?myList='+mySearch.value,'myExample','width=600,height=700,modal=yes, scrollbars=yes, location=no');
}
}
</script>
<script type="text/javascript">
function readValue()
{
var XX = document.getElementById("myFileNoX");
alert(XX.value);
}
</script>
<?php
.
.
.
others codes goes down here
===========================================
<!-- file.php -->
========================================
<?php session_start(); ?>
<html>
<head>
</head>
<body>
<?php $txtFile = $_GET['myList']; ?>
<script type="text/javascript">
function submitForm()
{
document.forward.submit()
close();
}
</script>
<script type="text/javascript">
function closeNull()
{
close();
}
</script>
<?php
include_once('./Connections/myconn.php');
$db = mysql_select_db('registryis', $myconn);
if (!$db) {// if the database is not available
$message = " There was a problem in trying to connect to the database.Please try later after sometime";
mysql_error();
exit;
}
$result = @mysql_query("select * from file where fileTitle like '%$txtFile%' or fileNo like '%$txtFile%';");
if (!$result) {
exit('<p> Error performing query: ' . mysql_error() . '</p>');
}
$num = mysql_num_rows($result);
if ($num == 0) {
?>
<table width="75%" border="1" align="left" bgcolor="#CC99CC">
<tr>
<td><div align="center" class="style1">Your Search Found No File(s) <BR>
<input type=button onClick="closeNull()" value='Close Window'> </div> </td>
</tr>
</table>
<?php } else { ?>
<table width="75%" border="1" align="center" bgcolor="#CC99CC" >
<FORM NAME="forward" ACTION="regAssignUser.php" />
<tr>
<td width="196"><strong>File Number</strong></td>
<?php do { ?>
<td><?php echo $row_qry['fileNo']; ?> </td>
<?php $fileNo = $row_qry['fileNo']; ?>
<input type="hidden" name="myFileNo" id="myFileNoX" value = <?php echo $fileNo; ?> />
<td><input type="radio" name="radSelect" value="Select" onClick ="submitForm()" /> </td>
</tr>
<?php } while ($row_qry = mysql_fetch_array($result)); } ?>
</form>
</table>
</body>
</html>
Bookmarks