Re: validation error

by "Kathleen Anderson" <kathleen(at)spiderwebwoman.com>

 Date:  Fri, 11 Aug 2000 20:37:12 -0400
 To:  "Shelley Watson" <shelleyw(at)home.com>,
<hwg-basics(at)hwg.org>
 References:  home
  todo: View Thread, Original
Hi Shelley:
Change your DOCTYPE declaration to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd>

The Name attribute was removed in HTML 4.0 and added back in in 4.01


~ Kathleen Anderson
Spider Web Woman Designs
mailto:kathleen(at)spiderwebwoman.com
http://www.spiderwebwoman.com/
AWARE:  http://aware.hwg.org/



----- Original Message ----- 
From: Shelley Watson <shelleyw(at)home.com>
To: <hwg-basics(at)hwg.org>
Sent: Friday, August 11, 2000 7:49 PM
Subject: validation error


> Hi folks
> 
> I've tried out a javascript generator recommended by someone on
> this list and everything works, however the page does not
> validate now because of this error:
> ----------------
> Line 59, column 180:
>   ... ="Ichange('default1')"><IMG SRC="navar1.gif" NAME="image1"
> border="0"  ...
>                                                         ^
> Error: there is no attribute "NAME"
> ----------------
> I'm wondering how important that is and if I should be looking at
> redoing the javascript somehow in order to get my page to
> validate. Comments anyone?
> 
> Here's the relevant part of the script:
> 
> <SCRIPT LANGUAGE="JavaScript" TYPE="text/jscript">  <!-- Hide
> from old browsers
> 
> var iName=""; var nav=navigator.appName.indexOf("Netscape"); var
> vers=parseInt(navigator.appVersion);
>   if ( (nav != -1 && vers >= 3) || (vers == 4) ) {
> default1 = new Image(); default1.src = "navar1.gif"
> changed1 = new Image(); changed1.src = "navar1b.gif"
> default2 = new Image(); default2.src = "navar2.gif"
> changed2 = new Image(); changed2.src = "navar2b.gif"
> default3 = new Image(); default3.src = "navar3.gif"
> changed3 = new Image(); changed3.src = "navar3b.gif"
> default4 = new Image(); default4.src = "navar4.gif"
> changed4 = new Image(); changed4.src = "navar4b.gif"
> default5 = new Image(); default5.src = "navar5.gif"
> changed5 = new Image(); changed5.src = "navar5b.gif"
>   }
>   function Ichange(p) {
>     if ( (nav != -1 && vers >= 3) || (vers == 4) ) {
>     var pSrc=eval(p+ ".src");
>     document[iName].src = pSrc;
>     }
>   }
> // end hiding -->
> </SCRIPT>
> 
> ******** The error shows up with regard to the line in the BODY
> that starts the image swap as noted below********
> 
> <.A HREF="./" TARGET="_parent"
> onMouseOver="iName='image1'; Ichange('changed1')"
> onMouseOut="Ichange('default1')"><IMG SRC="navar1.gif"
> NAME="image1" border="0" WIDTH="168" HEIGHT="80" ALT="Main
> Page"></A>
> 
> ********* Here's hoping that I can squeeze in the javascript
> course in the near future :)
> 
> TIA
> 
> Shelley
> 
> 

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA