Skip to main content

Bug Tracker

Side navigation

#7737 closed bug (invalid)

Opened December 09, 2010 02:43PM UTC

Closed December 29, 2010 07:49AM UTC

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:
Description

Hi!

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

$('#section').html('test')

, it works great in all browsers.

I think there is a bug in the load method.

Attachments (0)
Change History (6)

Changed December 09, 2010 02:51PM UTC by jitter comment:1

owner: → 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

Changed December 09, 2010 03:49PM UTC by anonymous comment:2

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') {
		$('#special-fields-section').html(data);
	}
});

works in both (IE7 and Firefox)!

Changed December 09, 2010 03:57PM UTC by sedmicka comment:3

status: pendingnew

mistake...working is this:

$.get('/action.ashx', function (data, status) {
	if (status == 'success') {
		$('#section').html(data);
	}
});

Changed December 09, 2010 08:29PM UTC by jitter comment:4

status: newpending

Replying to [comment:2 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

Changed December 14, 2010 04:42PM UTC by jitter comment:5

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

Changed December 29, 2010 07:49AM UTC by trac-o-bot comment:6

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!