Howto validate this html...?

Discussion in 'HTML' started by Tom, May 5, 2004.

  1. Tom

    Tom Guest

    <a href="index.jsp"><img src="images/home.gif" width="81" height="21"
    alt="Home" name="home" onmouseover="home.src = homeon.src"
    onmouseout="home.src = homeoff.src" /></a>

    I am having a problem validating the name="home" part of this html...
    Any thoughts on how I can make it validate without having to rejig/rewrite
    the javascript?

    Thanks for any thoughts.
    Tom
     
    Tom, May 5, 2004
    #1
    1. Advertising

  2. Tom

    Mitja Guest

    Tom <>
    (news:c7bp8j$tes$) wrote:
    > <a href="index.jsp"><img src="images/home.gif" width="81" height="21"
    > alt="Home" name="home" onmouseover="home.src = homeon.src"
    > onmouseout="home.src = homeoff.src" /></a>
    >
    > I am having a problem validating the name="home" part of this html...
    > Any thoughts on how I can make it validate without having to
    > rejig/rewrite the javascript?
    >
    > Thanks for any thoughts.
    > Tom


    Name parameter only applies to form elements; use id instead.
     
    Mitja, May 5, 2004
    #2
    1. Advertising

  3. Tom

    Steve Pugh Guest

    "Tom" <> wrote:

    ><a href="index.jsp"><img src="images/home.gif" width="81" height="21"
    >alt="Home" name="home" onmouseover="home.src = homeon.src"
    >onmouseout="home.src = homeoff.src" /></a>
    >
    >I am having a problem validating the name="home" part of this html...
    >Any thoughts on how I can make it validate without having to rejig/rewrite
    >the javascript?


    Which version of HTML are you validating against?

    name is valid as an attribute of img in all versions of HTML 4.01 and
    in XHTML 1.0 Transitional. I'm guessing that you're trying to use
    XHTML 1.0 Strict. Do you have any strong reasons to use that over HTML
    4.01 Strict?

    Using id instead of name won't require any major changes to the
    JavaScript but will stop the rollover working in some older browsers.

    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, May 5, 2004
    #3
    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. Titus A Ducksass - AKA broken-record
    Replies:
    6
    Views:
    690
    Titus A Ducksass - AKA broken-record
    Nov 15, 2004
  2. Replies:
    7
    Views:
    1,075
  3. heiko
    Replies:
    0
    Views:
    1,063
    heiko
    Oct 1, 2005
  4. Aykut Canturk
    Replies:
    2
    Views:
    506
    Munna
    Jun 4, 2008
  5. Dan

    howto validate a checkboxlist

    Dan, Jul 9, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    205
    David
    Jul 16, 2003
Loading...

Share This Page