jQuery 1.6.2 erroring with Operation is not supported" code: "9
I am getting the following error in firebug: jQuery 1.6.2 erroring with Operation is not supported" code: "9. Firstly can someone tell me the exact meaning of this error? Secondly, what I am doing is using dialog to display a form, which displays fine, but whenever I click in an input field, it triggers this error. I have attached my code and would be grateful for some guidance:
jQuery 1.6.2 jQuery-ui 1.8.14
// Help function
function help() {
$(function () {
$('#feedback').dialog({
resizeable: true,
title: "Mail Help",
width: 500,开发者_JAVA百科
height: 420,
modal: true,
overlay: {
backgroundColor: "#000",
opacity: 0.3
}
});
$("feedback").dialog('open');
});
}
// Feedback form
<div id="form" style="display:none;">
<form method="post" id="feedback" class="webform" name="feedback">
<label for="company">Company</label>
<select name="company" id="company">
<option SELECTED VALUE="">Select an option</option>
<option value="Technical">Technical</option>
<option value="Database">Database</option>
<option value="Error">Error</option>
<option value="Other">Other</option>
</select>
<label for="name">Full Name:</label>
<input id="uname" name="uname" type="text" class="text ui-widget-content ui-corner-all inputbox uname" value="<?php echo $_SESSION['kt_name_usr']; ?>" />
<label for="email">Email address:</label>
<input id="email" name="email" type="text" class="text ui-widget-content ui-corner-all inputbox email" value="<?php echo $_SESSION['kt_email_usr']; ?>" />
<label for="position">Position:</label>
<input id="position" name="position" type="text" class="text ui-widget-content ui-corner-all inputbox position" />
<label for="feedbacknew">Feedback:</label>
<textarea id="feedbacknew" name="feedbacknew" cols="25" rows="3" type="text" class="text ui-widget-content ui-corner-all inputbox feedbacknew">Please make sure that any error messages or numbers are listed here </textarea><br />
<button id="submit" class="submit">Submit</button>
<div id="message"></div>
</form>
</div>
Found how to fix it in some of my cases.
In jQuery source (not min) find this block:
if ( document.documentElement.contains ) {
Sizzle.contains = function( a, b ) {
return a !== b && (a.contains ? a.contains(b) : true);
};
} else if ( document.documentElement.compareDocumentPosition ) {
Sizzle.contains = function( a, b ) {
return !!(a.compareDocumentPosition(b) & 16);
};
} else {
Sizzle.contains = function() {
return false;
};
}
and add the try-catch for the line return !!(a.compareDocumentPosition(b) & 16);
if ( document.documentElement.contains ) {
Sizzle.contains = function( a, b ) {
return a !== b && (a.contains ? a.contains(b) : true);
};
} else if ( document.documentElement.compareDocumentPosition ) {
Sizzle.contains = function( a, b ) {
try {
return !!(a.compareDocumentPosition(b) & 16);
}
catch (e) {
return false
}
};
} else {
Sizzle.contains = function() {
return false;
};
}
Why it happens you can read here in the Exceptions section.
精彩评论