- From: Brant Langer Gurganus <brantgurganus2001@cherokeescouting.org>
- Date: Sat, 04 Jan 2003 23:40:09 -0500
- To: "Robert J. Accettura" <robert@accettura.com>
- CC: www-validator@w3.org
Received on Saturday, 4 January 2003 23:40:59 UTC
Robert J. Accettura wrote: > 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"><!-- Do you know the language tag is deprecated. Also, the appropriate MIME type is application/x-javascript since text/javascript is not a registered type. > 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> I don't see why you need this stuff in JavaScript. Can't you just use <object><param><img></object>? If the browser can't load the object then it is supposed to load the child elements after the parameters. -- Brant Langer Gurganus http://troop545.cjb.net/brant.xhtml
Received on Saturday, 4 January 2003 23:40:59 UTC