开发者

jQuery IE8 Object required

I have a button, that when clicked is supposed to open a jQuery UI Dialog. It works in FF3, FF4, Chrome, and IE8 with ChromeFrame. It does not work in normal 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); },
                                                     "开发者_StackOverflow中文版Meeting": function() { sendPunch("NONPROD", "MEETING", $("#loadedMech").val(), isLeader);} } );
    loadDefaults();
}

I am using jQuery UI 1.8.4, and jQuery 1.4.2

The error occurs on line 4481 of the uncompressed jQuery file.

UPDATE

I was able to figure out that the problem comes from the command $("#dialogSmall").html(HTML);. I am still trying to figure out why this happens.


The HTML variable does not contain valid HTML. It may help if you add the missing tags.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜