title attribute and image swap

Discussion in 'HTML' started by Richard, Jan 21, 2005.

  1. Richard

    Richard Guest

    Now that I've finally gotten this menu scheme working properly, I am slowly
    putting in some working images to go with it.
    BTW, validating the file every step of the way.

    Using an image on the original loaded page, validation requires an alt
    attribute.
    However, using the straightforward technique of image swapping
    onclick="document.main.src='swap.jpg'"
    The alt attribute appears as if the original image were still in place.
    Is there a way to correct this so the proper alt information appears if I
    don't just want to say "image"?
    Richard, Jan 21, 2005
    #1
    1. Advertising

  2. Richard

    Richard Guest

    On Fri, 21 Jan 2005 01:54:37 -0600 Richard wrote:

    > Now that I've finally gotten this menu scheme working properly, I am
    > slowly
    > putting in some working images to go with it.
    > BTW, validating the file every step of the way.


    > Using an image on the original loaded page, validation requires an alt
    > attribute.
    > However, using the straightforward technique of image swapping
    > onclick="document.main.src='swap.jpg'"
    > The alt attribute appears as if the original image were still in place.
    > Is there a way to correct this so the proper alt information appears if
    > I
    > don't just want to say "image"?



    Totally idiotic.
    onclick="document.main.src='images/galaxy.jpg'" alt="galaxy"

    The alt tag makes the file compliant and does nothing.
    When you mouse over the image, the old alt information shows up.
    Richard, Jan 21, 2005
    #2
    1. Advertising

  3. Richard

    Duende Guest

    While sitting in a puddle Richard scribbled in the mud:

    > BTW, validating the file every step of the way.


    Yup, you sure are. down to only 12 Errors.
    http://tinyurl.com/5btko

    --
    D?
    http://wipkip.biz just to raise my PR
    Duende, Jan 21, 2005
    #3
  4. Richard

    Richard Guest

    On 21 Jan 2005 08:23:31 GMT Duende wrote:

    > While sitting in a puddle Richard scribbled in the mud:


    >> BTW, validating the file every step of the way.


    > Yup, you sure are. down to only 12 Errors.
    > http://tinyurl.com/5btko


    Really? Considering what I'm working on is not even online yet, how did you
    manage that trick?
    Besides, those errors are not of my doing if you'll bother to read them.

    You are aware that it is possible to validate a LOCAL file right?
    Maybe I should call you DtS. Duende the Stoopid.
    Richard, Jan 21, 2005
    #4
  5. Richard

    Steve Pugh Guest

    "Richard" <Anonymous@127.001> wrote:

    >Using an image on the original loaded page, validation requires an alt
    >attribute.
    >However, using the straightforward technique of image swapping
    >onclick="document.main.src='swap.jpg'"
    >
    >The alt attribute appears as if the original image were still in place.
    >Is there a way to correct this so the proper alt information appears if I
    >don't just want to say "image"?


    An image is defined as follows
    <img src="value" alt="value">

    When you change element.src what do you think you're changing? Yes,
    well, done you're changing the value of src.

    So how do you think you change the value of alt?

    Yes, element.alt="new value"

    Well done, now go back to your seat and try not to disturb the rest of
    the class again.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jan 21, 2005
    #5
  6. Richard wrote:
    > Now that I've finally gotten this menu scheme working properly


    ...for some value of "properly". A very small value.

    With js off, it does nothing. But you know that.

    With js on, the flashing text and image outlines that fly around and
    about the page, make it worthless. Pure crap.

    Take a vacation.

    --
    -bts
    -This space intentionally left blank.
    Beauregard T. Shagnasty, Jan 21, 2005
    #6
  7. While the city slept, Richard (Anonymous@127.001) feverishly typed...

    > Using an image on the original loaded page, validation requires an alt
    > attribute.
    > However, using the straightforward technique of image swapping
    > onclick="document.main.src='swap.jpg'"
    > The alt attribute appears as if the original image were still in
    > place.


    http://www.nigenet.org.uk/stuff/thumbtastic/

    This uses javascript to swap the image and change the alt text if javascript
    is available. If not, some PHP code reloads the page with the selected image
    (and alt text).

    Cheers,
    Nige

    --
    Nigel Moss
    http://www.nigenet.org.uk
    Mail address not valid. , take the DOG. out!
    In the land of the blind, the one-eyed man is very, very busy!
    nice.guy.nige, Jan 21, 2005
    #7
  8. Richard

    Richard Guest

    On Fri, 21 Jan 2005 06:22:15 -0500 Beauregard T. Shagnasty wrote:

    > Richard wrote:
    >> Now that I've finally gotten this menu scheme working properly


    > ..for some value of "properly". A very small value.


    > With js off, it does nothing. But you know that.


    > With js on, the flashing text and image outlines that fly around and
    > about the page, make it worthless. Pure crap.


    > Take a vacation.


    I have not yet put MY version online which WILL work with JS off.
    Richard, Jan 21, 2005
    #8
  9. Richard

    Oli Filth Guest

    Richard wrote:
    > I have not yet put MY version online which WILL work with JS off.
    >


    I would guess that's because it's impossible (I'm assuming by JS you
    imply all client-side script cleverness), unless you use server-side
    scripting.

    But then that would defeat the whole point of what you were originally
    trying to do, which (IIRC) was to create a gallery that doesn't require
    server-side scripting or an individual HTML page for each image.

    --
    Oli
    Oli Filth, Jan 21, 2005
    #9
  10. Richard

    Toby Inkster Guest

    Toby Inkster, Jan 22, 2005
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Phillip Roncoroni
    Replies:
    6
    Views:
    6,187
  2. Niels Dekker (no reply address)

    What swap is called when using std::swap?

    Niels Dekker (no reply address), Jul 19, 2006, in forum: C++
    Replies:
    4
    Views:
    975
    Niels Dekker (no reply address)
    Jul 20, 2006
  3. rote
    Replies:
    5
    Views:
    904
  4. soonic
    Replies:
    11
    Views:
    1,758
    soonic
    Jul 27, 2011
  5. Clay
    Replies:
    1
    Views:
    138
    Elegie
    Sep 28, 2006
Loading...

Share This Page