A question about Javascript Banners

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ampulator

    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.


  • Martin Honnen

    #2
    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.javas cript.
    Guessing totally I assume you need
    <img id="anImage" src="whatever.g if" alt="whatever" />
    and then
    var img;
    if (document.getEl ementById) {
    img = document.getEle mentById('anIma ge');
    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:



    --

    Martin Honnen


    Comment

    Working...