[Proto-Scripty] Ajax.Updater not working in IE, works fine in FF Chrome and Safari

2010-03-16 Thread David Behler

Hey folks,
maybe you can help me out with this.

I got a simple function that I use to load sub-categories when clicking 
on a parent category:


function toggleSubCats(cat, id)
{
/* Vars and stuff */
catObj = $(cat);
var send=null;

/* Now figure out the status of the element and open or close based 
on what's found */

if( catObj.getStyle('display') == 'none') {
catObj.setStyle({display : 'block'});
} else {
catObj.setStyle({display : 'none'});
return;
}

/* Let's first dump a loading image in the target div then send the 
AJAX request */

catObj.update(img src=' + base_images + loading_small.gif' /);
var url= base + 'galleryback/showSubCat/'+id;

new Ajax.Updater(catObj,url);

/* Alternative to Ajax.Updater() call
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
$(cat).update(transport.responseText);
}
});
*/
}

All it's supposed to do,  is to get the element (in this case a div) 
with the id submitted in the cat parameter and display/hide it. If 
display is set to block, then an loading image is shown and ajax.updater 
is called to load the sub-categories to the higher category (id parameter).


This works fine in FF3.6, Chrome and Safari, but in IE8 the loading 
image is not replaced with the loaded sub-categories. If I replace the 
Ajax.Updater call with an Ajax.Request call (see commented section below 
Ajax.Updater) it does not work either in IE8, but I can alert the 
responseText and the catObj.update() does not raise an error, it just 
doesn't have any effect.


Not sure this is important but here is another info that might help you 
solving this:
On intital loading of the page I display only the top categories, 
clicking on one of them calls the above shown function and displays the 
child categories. But clicking on one of the loaded child categories, 
it's where the problem starts and it does not work anymore in IE8. Do 
you think it's some weird problem caused by adding elements after the 
DOM was loaded?


I really hope you can help me with this!

Thanks in advance,

David

--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Ajax.Updater not working in IE, works fine in FF Chrome and Safari

2010-03-15 Thread David Behler

Hey folks,
maybe you can help me out with this.

I got a simple function that I use to load sub-categories when clicking 
on a parent category:


function toggleSubCats(cat, id)
{
/* Vars and stuff */
catObj = $(cat);
var send=null;

/* Now figure out the status of the element and open or close based 
on what's found */

if( catObj.getStyle('display') == 'none') {
catObj.setStyle({display : 'block'});
} else {
catObj.setStyle({display : 'none'});
return;
}

/* Let's first dump a loading image in the target div then send the 
AJAX request */

catObj.update(img src=' + base_images + loading_small.gif' /);
var url= base + 'galleryback/showSubCat/'+id;

new Ajax.Updater(catObj,url);

/* Alternative to Ajax.Updater() call
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
$(cat).update(transport.responseText);
}
});
*/
}

All it's supposed to do,  is to get the element (in this case a div) 
with the id submitted in the cat parameter and display/hide it. If 
display is set to block, then an loading image is shown and ajax.updater 
is called to load the sub-categories to the higher category (id parameter).


This works fine in FF3.6, Chrome and Safari, but in IE8 the loading 
image is not replaced with the loaded sub-categories. If I replace the 
Ajax.Updater call with an Ajax.Request call (see commented section below 
Ajax.Updater) it does not work either in IE8, but I can alert the 
responseText and the catObj.update() does not raise an error, it just 
doesn't have any effect.


Not sure this is important but here is another info that might help you 
solving this:
On intital loading of the page I display only the top categories, 
clicking on one of them calls the above shown function and displays the 
child categories. But clicking on one of the loaded child categories, 
it's where the problem starts and it does not work anymore in IE8. Do 
you think it's some weird problem caused by adding elements after the 
DOM was loaded?


I really hope you can help me with this!

Thanks in advance,

David

--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.