views:

362

answers:

1

Hi,

I've got a quite strange problem here.

I'm calling some simple code via Ajax.Updater:

new Ajax.Updater('load','http://myurl.com/demo.pl?key=demokey&param1=xyz&param2=abc',{ method:'get', onComplete:function(transport){ alert(transport.responseText) } });

which gets some code like this:

<img id="2009_04_15_1239786246" src='../pv/100/2009_04_15_1239786246-01.jpg' border="1"> <img id="2009_04_15_1239786066" src='../pv/100/2009_04_15_1239786066-01.jpg' border="1">

... and so on

This code shows up in my firebug console as my server response, so everything should be fine. No errors here at all. Works fine in Safari 4.

Firefox 3.6, according to Firebug, knows there is a response, but it won't show a thing in my div 'load' and the alert(transport.responseText) is also empty.

I have no idea what could be the problem here.

A: 

You are using numbers in the beginning of of your <img> tag ids, which is not correct and might make some browsers to turn against you. Use some other leading character in those ids.

Look here: http://www.w3.org/TR/html4/types.html#type-id

npup
I've tried it, but I still got the same result. Even if Firefox had problems with an ID beginning with a number, it should show the responsetext.
koko
Hm, just for the heck of it, you could try using onSuccess callback, and see if there is some change in behaviour from Firefox (as opposed to using onComplete i mean). Shouldn't make a difference I guess, especially since you use Updater directly and all. But since it is a bit enigmatic you can at least give it a shot and see i FF gets the responseText right then.
npup
No difference in the behaviour of the ajax call, but my following code messing with the images isn't working anymore. Might be just the difference between onSuccess and onComplete (which I'm not aware of at the moment :) ), but I'll check if that's the problem. Thanks for the hint.
koko