Code: Select all
Error: Incorrect document format
Source file:
Row 1, column 45
Source code:
Error: uncaught exception: [Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)" location: "http://127.0.0.1/WebLibThirdParty/JavaScript//jquery.js Line: 112"]
Code: Select all
$(document).ready(function() {
// when the #guest_details is clicked
$('#guest_details').click(function() {
var postedData = $('#guest-details-dialog-contents form').serialize();
var uri = '/';
$.ajax({
type: 'POST',
data: postedData,
url: uri,
success: function(data) {
// this works
alert(data);
// this doesn't work
alert($(data).html());
}
});
return false;
});
});
Code: Select all
alert($(data).html());
BEARBEITEN:
Okay. Das Problem besteht darin, dass AJAX fehlerhaftes XHTML zurückgibt. Es ändert Tags in HTML:
Code: Select all
becomes
becomes
and so on