Click to See Complete Forum and Search --> : HTML closing tags inside javascript


Lucien
09-18-2003, 01:46 AM
When I went to http://validator.w3.org I discovered that I needed to change all HTML closing tags inside the javascript from (for example) </font> to <font/>, </p> to <p/>, </head> to <head/>, etc. Once I did this, http://validator.w3.org gave the message: "This Page Is Valid HTML 4.01 Transitional!"

Now the revised javascript for the jclicker slide shows works fine in Explorer but does not work in Netscape 7.1. Prior to my changing the end tags, the javascript worked in both Explorer and Netscape.

The script for the slide show comes from http://www.mcli.dist.maricopa.edu/proj/jclicker
which offers this free javascript for doing multiple slide shows.

In order to solve the problem I had to keep the unrevised javascript for Netscape 7.1 and make a special link.

The slide shows can be reached from my WebSite
http://all-opinions-welcomed.com/Jason_HomePage/Winter_Camping/index.htm

Is there a new rule regarding closing HTML tags inside Javascript, of which Netscape 7.1 is not prepared to handle.

Please let me know,

Lucien.

Fang
09-18-2003, 02:55 AM
</font> is a closing tag
<font/> is an empty tag (start and end tag)
That was not the problem

This is
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<SCRIPT language=javascript type=text/javascript>

Quote ALL attributes
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT type="text/javascript">

and then sort out the other 63 validation errors