我有一个函数update_record(),当用户更新报告时调用,记录更新成功但更新后我有jAlert窗口查看我的客户"记录已更新"但是这个窗口没有出现。请帮我解决这个问题。
function update_record()
{
$MainTitle=cleanstr(@$_POST['maintitle']);
//$CAID=(int) cleanstr($_POST['controllist']);
$CAID=@$_POST['dropdown'];
$mainid=@$_POST['mainid'];
if(empty($MainTitle) or empty($CAID))
{
echo "<script type='text/javascript'>
jAlert('Cannot update empty record ', 'Save Info');
</script>";
}
else {$Query="UPDATE accountmain SET CAID='$CAID', MainTitle ='$MainTitle' WHERE MainID='$mainid'";
mysql_query($Query) or die(mysql_error());
//print "<div style=background-color:#ffffcc; border: 1px dashed cccccc;> Record Updated successfully </div>";
echo "<script type='text/javascript'>
jAlert('Record updated successfully ', 'Update Info');
</script>";
}
}