W3C home > Mailing lists > Public > www-validator@w3.org > January 2003

JavaScript messes up validator

From: Robert J. Accettura <robert@accettura.com>
Date: Sat, 04 Jan 2003 23:18:39 -0500
Message-ID: <3E17B21F.7030601@accettura.com>
To: www-validator@w3.org
When the following code is passed through it catches the </object> tag, 
but doesn't see that one is opened.  Since the code was fine before it 
was put into a javascript, I think it might be a bug.

<script type="text/javascript" language="JavaScript"><!--
	var browserName = navigator.appName;
	var l1splash = '<object type="application/x-shockwave-flash" 
data="/gfx/splash.swf" width="391" height="127">'
	var l2splash = '<img src="noflash.gif" width="200" height="100" alt="" />'
	var l3splash = '<param name="movie" value="/gfx/splash.swf" /></object>'
	browserVer = parseInt ( navigator.appVersion );
	if ( browserName == "Netscape" && browserVer < 5 ) 
{document.write(l1splash + l3splash);
	} else {
		document.write(l1splash + l2splash + l3splash);
	}
// --></script>

-- 
Robert J. Accettura
robert@accettura.com <mailto:robert@accettura.com>

Received on Saturday, 4 January 2003 23:19:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:05 GMT