Thanks, Rey. Trimming the output allows it to display correctly.
Of note: The callback for my new $.get() contains another (different)
$.get(). The inner $.get() doesn't use a callback, but when I first switched
the outer call over from .load(), IE reported this:
Line: 1615
Error: 'constructor' is null or not an object
Line 1615 in jquery.js is this:
if ( data.constructor == Function ) {
...which is inside something called 'extend', so I expect there may be some
sort of inheritance issue at play. To get rid of the error, I added an empty
callback to the inner $.get(), i.e. this:
$.get('/path/to/ajax/stuff/');
...became this:
$.get('/path/to/ajax/stuff/',function(){void(null);});
- jason
Rey Bango-2 wrote:
>
> Jason,
>
> I had a similar problem which ended up being a problem with the way that
> my server-side programming language, ColdFusion, was returning the rows.
> There was a ton of leading and trailing spaces in the response packet so
> once I trimmed that, it was able to insert my rows successfully. My code
> looks very similar to yours.
>
> I tried using Firebug to show me the response but the best results I got
> were with IE and ServiceCapture. That showed me how the response packet
> was malformed. Try out the latter to see if you're experiencing the same
> issue.
>
> Rey...
>
> Jason Huck wrote:
>> I ran into this problem today, trying to replace the contents of a
>> <tbody>,
>> but so far John's suggested workaround isn't quite doing the trick.
>> .load()
>> works everywhere except in IE.
>>
>> Using alternate code as suggested:
>>
>> $.get('/path/to/ajax/page/', function(thehtml){
>> $("tbody#foo").empty().append(thehtml);
>> });
>>
>> ...the empty() fires, but the append() somehow doesn't insert thehtml
>> correctly. thehtml is pretty basic, looks something like this:
>>
>> <tr>
>> <td>blah</td><td>blah</td><td>blah</td>
>> <td>blah</td><td>blah</td><td>blah</td>
>> <td>blah</td><td>blah</td><td>blah</td>
>> </tr>
>> <tr>
>> <td>blah</td><td>blah</td><td>blah</td>
>> <td>blah</td><td>blah</td><td>blah</td>
>> <td>blah</td><td>blah</td><td>blah</td>
>> </tr>
>>
>> What's really strange is, I _can_ get it to show up by doing this:
>>
>> $.get('/path/to/ajax/page/', function(thehtml){
>> $("tbody#foo").empty().append('<tr><td>' + thehtml + '</td></tr>');
>> });
>>
>> ...which I initially did just to verify that I was getting a result back.
>> This, though, screws up later code that operates on the newly added
>> nodes,
>> as well as just plain being wrong as far as I can tell.
>>
>> Any ideas?
>>
>> Thanks,
>> Jason
>>
>>
>>
>>
>>
>>
>>
>> John Resig wrote:
>>
>>>
>>>IE really hates dealing with Tables and innerHTML (which is what
>>>.load() uses). An alternative may look something like this (untested):
>>>
>>>$.get('ajaxClassObjects.act?type=5&id=9',function(html){
>>> $("#objects").empty().append( html );
>>>});
>>>
>>>It's worth a shot - let me know if that helps.
>>>
>>>--John
>>>
>>>
>>
>>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
--
View this message in context: http://www.nabble.com/Bug--tf2099071.html#a6639578
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/