Forum Moderators: open
I tried the The Satay Method [alistapart.com] but it left a bad taste in my mouth.
So I beat my head into the pavement until I came up with this. I achieve xhtml 1.0 transitional validation but... I'm not sure if it isn't on a technicality. So hopefully some people here might be able to help.
I added this Javascript to my php script.
<script type="text/javascript" language="JavaScript"> <!--
if ( navigator.appName == "Netscape" ) {
var flash = \''. $flash_embed_tags .'\';
}
else {
var flash = \''. $flash_object_tags .'\';
document.write( flash );
}
// -->
Well, everything worked, it just worked too good. I recieve validation in all browsers, well at least those I tested (ie6,NN7,Moz5,Opera7).
So am I simply cheating the parser, possible bug, by hiding my code in Javascript thus really doing nothing special? Or have I stumbled upon something here?
Should I just be happy that I can now use flash on all my pages and still be technically xhtml 1.0 transitional valid?
P.S. It doesn't work in html 4.01 transitional. It gives me a error on both the embed and object tags. It seems like it wouldn't be able to do that since only one or the other should actually be part of the page.
Why did you not like the Satay method?