...

View Full Version : Using variable as URL



amir103
04-28-2007, 01:01 PM
I'm using a flash embeding, and usually for the source i put:
src="flash.swf"
but I want the source to depend on a javascript variable, so if i have

<script>
var example="flash2.swf";
</script>
then how can I use that example variable as the source for the flash file?

shyam
04-29-2007, 10:29 AM
do it the hard way using the DOM api createElement and appendChild

or... do it the easy way and use document.write



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum