Ok, I found something...
If I look at the HTML tree in the IE debugger, on the left panel I
can't see any 'class' attribute. However, it does appear on the right
panel (called Attributs), with the correct value. But IE does not
seems to use it. I found that I can add an attribute to the div in the
left panel. So I tried to add an attribute named 'class', and I set
its value: this fixes the problem, and IE can apply the CSS!!!
Then, I tried something else... I used the old-style to build the DOM
tree:
this.content = document.createElement('div');
Element.extend(this.content);
this.content.setAttribute('id', this._name + "_content");
this.content.setAttribute('class', "fullContent");
document.body.appendChild(this.content);
instead of the new-style:
this.content = new Element('div', {'id': this._name + "_content",
'class': "fullContent"});
and it worked!!!
At first, I didn't put the quotes arround the attributes names, in the
hash:
this.content = new Element('div', {id: this._name + "_content",
class: "fullContent"});
but IE does not like this syntax (it asks for an int or a string). But
as you can see, giving a string does not seems to work well.
Am I doing something wrong with the new-style method? Or is it a known
issue in Prototype?
Thanks for your help.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.