我想使用jquery对话框,但我不断收到此错误。无法读取属性'1'的空错误jqueryui
股利我使用的对话框:
<div id="save-dialog" title="Save">
<p>Is this a tipo or a new patch? Leave blank if its a patch</p>
<p>Enter patch like this:"CB 1"</p>
<form>
<fieldset>
<input type="text" id="patch" value=""/>
</fieldset>
</form>
</div>
完全JS:
function savex(name){
var desc = jQuery('input#'+name).val();
var id = "<?php echo $_GET[id]; ?>";
var patch = jQuery("#patch").val();
jQuery("#save-dialog").dialog({
autoOpen:false,
height:300,
width:300,
modal:true,
buttons: {
"Saving": function(){
jQuery.ajax({
url: 'editcontentheroes.php',
type: 'post',
data: 'id='+id+'&desc='+desc+'&name='+name+'&patch='+patch,
always: function(output)
{
history.go(0);
}
});
},
Cancel: function(){
jQuery(this).dialog("close");
}
}
});
}
功能savex是由一个按钮调用。试图检查一些空变量,但没有发现任何问题。
编辑:标题的错误,我得到
EDIT2:我使用WordPress的
什么错误?您的标题是错误消息吗? – adeneo
您的错误不存在。 –
标题是错误信息 – thenewseattle