Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 08:10 PM
ampulator
Guest
 
Posts: n/a
Default A question about Javascript Banners

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.


  #2  
Old July 20th, 2005, 08:10 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: A question about Javascript Banners



ampulator wrote:
[color=blue]
> 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.[/color]

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/

 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles