简体   繁体   English

jQuery IE8必需的对象

[英]jQuery IE8 Object required

I have a button, that when clicked is supposed to open a jQuery UI Dialog. 我有一个按钮,单击该按钮时应打开jQuery UI对话框。 It works in FF3, FF4, Chrome, and IE8 with ChromeFrame. 它可以在具有ChromeFrame的FF3,FF4,Chrome和IE8中使用。 It does not work in normal IE8. 在正常的IE8中不起作用。 I get an error that simply says "Object required". 我收到一条错误消息,上面写着“需要对象”。 Below is the function the click calls. 以下是单击调用的功能。

function punchNonProd()
{
    var HTML = "";
    HTML += "<tr id='burdenLine'><td><strong>Description</strong></td><td><input class='ui-corner-all' type='text' id='diaNP' size='12'></td></tr>";
    HTML += "<tr><td>&nbsp;</td><td><span class='button' onClick='sendPunch(\"NONPROD\", $(\"#diaNP\").val(), $(\"#loadedMech\").val());'>Use Description</span></td></tr>";
    HTML += "</table>";

    $("#dialogSmall").dialog("option", "title", 'Non-Billable Punch')
                     .html(HTML)
                     .dialog("option", "width", 800)
                     .dialog("open")
                     .dialog("option", "position", "center")
                     .dialog( "option", "buttons", { "Kochtinuous": function() { punchKochImpr(); },
                                                     "Break": function() { sendPunch("NONPROD", "BREAK", $("#loadedMech").val(), isLeader); },
                                                     "Clean Up": function() { sendPunch("NONPROD", "CLEAN_UP", $("#loadedMech").val(), isLeader); },
                                                     "Huddle": function() { sendPunch("NONPROD", "HUDDLE", $("#loadedMech").val(), isLeader); },
                                                     "Meeting": function() { sendPunch("NONPROD", "MEETING", $("#loadedMech").val(), isLeader);} } );
    loadDefaults();
}

I am using jQuery UI 1.8.4, and jQuery 1.4.2 我正在使用jQuery UI 1.8.4和jQuery 1.4.2

The error occurs on line 4481 of the uncompressed jQuery file. 错误发生在未压缩的jQuery文件的4481行上。

UPDATE 更新

I was able to figure out that the problem comes from the command $("#dialogSmall").html(HTML); 我能够找出问题出在命令$("#dialogSmall").html(HTML); . I am still trying to figure out why this happens. 我仍在尝试找出原因。

The HTML variable does not contain valid HTML. HTML变量不包含有效的HTML。 It may help if you add the missing tags. 如果添加缺少的标签,可能会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM