PDA

View Full Version : Need Help with a Workaround...



The Lion
20 Jan 2008, 08:53 AM
I'm using the 'swfobject' to pass XHTML validation with flash on my web page. Everything is working just fine, but I would like to know if there is a way that I can have the javascript write to a DIV 'class' instead of an 'id'?

Here is the code:

<div id="flashcontent">This text is replaced by the Flash movie.</div>
<script type="text/javascript">
var so = new SWFObject("http://www.mymoviepath.com", "mymovie", "10", "10", "6.0.65", "#ffffff");
so.addParam ("base", "http://www.mymoviepath.com/fls/");
so.useExpressInstall('http://mymoviepath.com/fls/expressinstall.swf');
so.addParam("wmode", "transparent");
so.write("flashcontent");
</script>

As you can see, 'flashcontent' is replaced with the flash movie. I would just like to have 'flashcontent' work as a 'class' instead of an 'id'.

Is this possible? And can anyone help me make it happen?

Thanks so much in advance.