[thelist] Javascript not validating
apathetic
timbooker at gmail.com
Thu Sep 23 17:25:34 CDT 2004
On Thu, 23 Sep 2004 14:43:48 -0500, Kevin Switzer
<kevin.switzer at stamats.com> wrote:
> I have the following code in a page, and the HTML is not validating....
>
> <script language="JavaScript" type="text/javascript">
>
> <!--
>
> document.write('<a href="Javascript:forward2()"><img
> src="/images/home/random/R'+which+'.jpg" width="331" height="199"
> border="0" id="photoslider" alt="Click to view next image"></a>');
>
> //-->
>
> </script>
All you need to do here is escape the slash in the closing a tag:
document.write('<a href="Javascript:forward2()"><img
src="/images/home/random/R'+which+'.jpg" width="331" height="199"
border="0" id="photoslider" alt="Click to view next image"><\/a>');
Tim
--
www.hyperlinkage.com - Free online RSS news reader
www.apatheticgenius.com
More information about the thelist
mailing list