HighDots Forums  

A question about Javascript Banners

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss A question about Javascript Banners in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ampulator
 
Posts: n/a

Default A question about Javascript Banners - 06-27-2004 , 03:02 AM






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.



Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: A question about Javascript Banners - 06-27-2004 , 07:03 AM








ampulator wrote:

Quote:
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/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.