Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Firefox and setAttribute
- From: stevec at topdogstrategy.com (Steve Clason)
- Subject: [Javascript] Firefox and setAttribute
- Date: Mon Oct 17 21:48:46 2005
Hi,
Can anyone point me to a good source that explains Firefox's problem
handling of setAttribute? I keep running into problems and would like to
take the time to understand what's going on.
Right now, I have this:
<code>
var slide = document.createElement("img");
slide.setAttribute("src","images/image.gif");
slide.setAttribute("alt","this is alt text");
slide.setAttribute("id","slide");
document.appendChild(slide);
</code>
The image element is placed and has an id and alt text attributes, but
no src.
If I try:
<code>
slide.src = "images/image.gif";
</code>
I get the same thing--no image, but id and alt text.
Both techniques work in IE and Opera so I'm pretty sure this is a FF
peculiarity.
I'll take all the help I can get on this.
Thanks in advance,
--
Steve Clason
- Follow-Ups:
- [Javascript] Firefox and setAttribute
- From: Schalk Neethling
- [Javascript] Firefox and setAttribute
- Prev by Date: [Javascript] Re:Refresh the page only once-reg
- Next by Date: [Javascript] DOM book
- Previous by thread: [Javascript] Re:Refresh the page only once-reg
- Next by thread: [Javascript] Firefox and setAttribute
- Index(es):