Javascript PHP在关闭图像显示结果时单击搜索时弹出图像

时间:2012-06-27 02:31:06

标签: java php javascript

当我点击搜索弹出的图片时,表单的值没有传递给php脚本。

点击搜索运行此代码 - >

<?php 
$loan_amt = $_POST['loan_amt']; 
if($_POST['search']){
if($_POST['loan_amt']=="" || $_POST['loan_tenure']==""){
$error = "Please fill up the mandatory fields"; 
}else{
session_start();
$_SESSION['property_type'] = $_POST['property_type'];
$_SESSION['property_status'] = $_POST['property_status'];
$_SESSION['loan_amt'] = $_POST['loan_amt'];
$_SESSION['loan_tenure'] = $_POST['loan_tenure'];

header("location:rates_results.php");
}
}
?>

表格(贷款金额字段)

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" onsubmit="this.loan_amt.value=this.loan_amt.value.replace(/\,/g,'')">
<table width="400px">
<tr>
<td class="color1" width="130">Loan Amt (SGD)*:</td>
<td width="258" align="left">
<input type="text" style="width:150px;font-size:16px" onkeyup="format(this)" onchange="format(this)"
onblur="if(this.value.indexOf('.')==-1)this.value=this.value" name="loan_amt">
</td>
</tr>
</table>
</form>

搜索/提交按钮

<div id="examples">
<span id="images">
<a href="images/9features.png" toptions="effect = clip, layout = quicklook">
<input type="submit" class="buttonStyle" name="search" value="search" />
</a>
</span>
</div>

0 个答案:

没有答案