Error console -> syntax error
Using:
Firefox 4,
jQuery 1.5.1 min
When I click on front_item the content in front_container updates with contect which is in test.txt, but Firefox 4 -> Web developer -> Error console says
If I write <p>Test bla</p> it works without error. Even if I change dataType to text and $(id).text() it's the same.
So there must be always something like <something>My content</something>?
Error: syntax error
Source File: file:///E:/test1/test.txt
Line: 1, Column: 1
Source Code:
Test bla
test.txt
Test bla
<div id="front_item" onclick="update('#front_container', 'test.txt');">Item 1</div>
<div id="front_container"></div>
function update(id, url) {
$(document).ready(function() {
$(id).toggle();
$(id).fadeIn(250);
$(id).html('<img src="images/ajax-loader.gif" />');
$.ajax({
url: url,
type: "POST",
dataType: "html",
success: function(data) {
$(id).html(data);
}
});
});
}