Bug Tracker

Opened 6 years ago

Closed 6 years ago

#7737 closed bug (invalid)

load throws an exception set div content to empty string

Reported by: sedmicka Owned by: sedmicka
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:



I'm loading dropdown option elements dynamicaly by the

$('#section').load('/action.ashx', function() {});

method. It gets data from server and in firefox it removes content of the #section div instead of swet the content from the response. Response content is ok. I checked it by firebug and also by this:

$('#section').load('/action.ashx', function(response, status, xhr) {alert(response);});

It displays response content from the server, but doesn't update #section div element! Content of the div is only removed.

Behaviour of the IE7 is that it throws exception and if I debug the script it jumps to the line where is "Syntax error, unrecognized expression:". Firefox doesn't throw any exception even there is no line in log.

I've checked my document and it is XHTML valid. If I change 'load' to


, it works great in all browsers.

I think there is a bug in the load method.

Change History (6)

comment:1 Changed 6 years ago by jitter

Owner: set to sedmicka
Status: newpending

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

Please submit a reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net. So that we can investigate this issue further.

How to report bugs

comment:2 in reply to:  1 ; Changed 6 years ago by anonymous

well I understand, but I can't put here production code, sorry.

I've checked right now that:

$('#section').load('/action.ashx', function (response, status, xhr) {});

doesn't work (throws an exception in IE7 and clears div content in Firefox without any exception), but this:

$.get('#section', function (data, status) {
	if (status == 'success') {

works in both (IE7 and Firefox)!

comment:3 Changed 6 years ago by sedmicka

Status: pendingnew

mistake...working is this:

$.get('/action.ashx', function (data, status) {
	if (status == 'success') {

comment:4 in reply to:  2 Changed 6 years ago by jitter

Status: newpending

Replying to anonymous:

well I understand, but I can't put here production code, sorry.

I didn't ask you to put any production code here. Just a test case which reproduces the problem else there is no way to debug this. How to report bugs

comment:5 Changed 6 years ago by jitter

Any progress on this? Please provide a test case as there is no way to know what causes your problem.

comment:6 Changed 6 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.