[英]calling jquery function in php after form post, the notification doesnt show
$result=$db->add_tender($t_name,$t_code,$t_category,$discription,$s_funds,$price,$deadline,$apply_to,$contact,$t_status,$_SESSION["VALID_USER_IDENTITY"]);
if($result==false){
$Err="Some thing went Wrong!-->".$result;
}
else{
$last_id=$result;
$message="Tender Successfully Added!";
?>
<script type="text/javascript">
function showAutoCloseMessage(){
showNotification({
message: ""<?php echo $message; ?>",
autoClose: true,
duration: 2
});
}
</script>
<?php
//header('Location:v_tender.php?t_id='.$last_id);
//header('Location:view_tenders.php');
}
替换belo代码
showNotification({
message: ""<?php echo $message; ?>",
autoClose: true,
duration: 2
});
通过
$(document).ready(function(){
showNotification({
message: "<?php echo $message; ?>",
autoClose: true,
duration: 2
});
});
因为“”被视为字符串已关闭,但字符串未在此处关闭。 也给控制台带来了错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.