By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,067 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

A question about Javascript Banners

P: n/a
I managed to make an image to constantly change every once in a while.
However, I don't know how to make it so that it is XHTML 1.1 strict.

If anyone wants to see the code, just reply.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


ampulator wrote:
I managed to make an image to constantly change every once in a while.
However, I don't know how to make it so that it is XHTML 1.1 strict.

If anyone wants to see the code, just reply.


I suggest you make a test page and post the URL with the question over
in comp.lang.javascript.
Guessing totally I assume you need
<img id="anImage" src="whatever.gif" alt="whatever" />
and then
var img;
if (document.getElementById) {
img = document.getElementById('anImage');
if (img) {
img.src = 'whatelse.gif';
img.alt = 'whatelse';
}
}
to change the src (and the alt if needed).
However XHTML 1.1 doesn't make much sense in my view unless you write
for Mozilla and Opera 7.50+ only as XHTML 1.1 should not be served as
text/html that IE needs:
http://www.w3.org/TR/xhtml-media-types/
http://www.w3.org/TR/xhtml-media-types/#summary

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.