Re: Rollover Problems

by "Donna M Smillie" <dms(at)zetnet.co.uk>

 Date:  Sun, 9 Jan 2000 17:41:15 -0000
 To:  "JAH" <artsylady(at)home.com>,
<hwg-basics(at)hwg.org>
 References:  default home
  todo: View Thread, Original
Hi Judy

At first I thought that Brian (Comharsa) had nailed the problem, but when I
did a quick double check I couldn't find the "rose1" or "rose2" images at
all, with or without initial capitals.  Are you sure the images have been
uploaded to the server?  You may want to check that.  Brian is right
though, when he advises using all lowercase for file names - Unix is case
sensitive, so, while Windows will happily regard "rose1.jpg" and
"Rose1.jpg" as the same thing, a Unix web server won't, and unless you
enter the file name in exactly the same form that it's saved on the server,
it won't produce it.

As for the two validation errors (neither of which are causing the problem
with your rollover images as far as I know) --

> Line 6, column 29:
>   <script language="JavaScript">
>                                ^
> Error: required attribute "TYPE" not specified

HTML 4.0 requires that a script declaration includes the TYPE of script, so
for javascript you need to add TYPE="TEXT/JAVASCRIPT" (in the same way
that, for example, a style declaration requires TYPE="TEXT/CSS").

> Line 48, column 157:
>   ... s','Images/Rose2.jpg','#947357088740')"><img name="roses"
border="0" s
> ...
>                                                         ^
> Error: there is no attribute "NAME"

The NAME attribute in an IMG tag simply isn't valid in HTML 4.0 - you would
need to use the image array to reference the images, rather than using
NAMEs, to be valid in HTML 4.0.  However on 24 December 1999 a revision was
brought in, HTML 4.01 (see http://www.w3.org/TR/html401/ ), which
supercedes HTML 4.0.  And one of the changes in this latest HTML spec is
that the NAME attribute is now valid for the IMG tag.  So if you change
your DTD to specify HTML 4.01 rather HTML 4.0 --

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

(the HTML 4.01 Strict DTD) or

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

(the HTML 4.01 Transitional DTD) or

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

(the HTML 4.01 Frameset DTD)

you should be able to use the NAME attribute for images and still validate
the page.

HTH!

Regards,
Donna
--
dms(at)zetnet.co.uk
Different Worlds:  http://www.users.zetnet.co.uk/dms/
Pictures of the Past, The Leslie Smith Family,
An Introduction to HTML, Copyright Considerations
Online Bookshop

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