Re: Rollover Problems

by "Debra Sawyers" <dsawyers(at)ptd.net>

 Date:  Sun, 9 Jan 2000 11:23:09 -0500
 To:  <hwg-basics(at)hwg.org>
 References:  default home
  todo: View Thread, Original

> When I tried to validate the page, the page generated these error
messages:
>
> Line 6, column 29:
>   <script language="JavaScript">
>                                ^
> Error: required attribute "TYPE" not specified
>
> Line 48, column 157:
>   ... s','Images/Rose2.jpg','#947357088740')"><img name="roses" border="0"
s
> ...
>                                                         ^
> Error: there is no attribute "NAME"


I can't see an immediate problem with the javascript line, but try using
<script language= "JavaScript" type="text/javascript">
In a previous class, someone had asked why the type had to be added, and
validation might be it.

The name attribute - this info comes straight from the SAMS Javascript
Unleashed source book

Examples of user-defined JavaScript identifiers
Valid                                Invalid
current_website            current Website
numberOfHits                #ofIslands
n                                      2beOrNotToBe
N                                      return

current Website is not valid because it contains a space and is interpreted
as two identifiers instead of one.  #ofIslands is not valid becuase the
poiund sign is not included in the set of characters that are valid for
identifiers. 2borNotToBe is not vlaid because it begins with a number.
return identifier is already used by JavaScript for another purpose.  It is
keywords/predifined identifier

So from these examples your variable starts with pound, but it is also a
number so you'll probably have to rename is totally.


Deb

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