Jump to content

Changing Embed Properties...


ChipChamp007

Recommended Posts

I've never tried this, but it should work. First, you'd have to have a way to get access to the element. Typically, the easiest way is to assign an ID to it:

<embed id="myembed" src="" autostart=false loop=false width="100%" height="45" name="radiosound">

Once you've done that, you can get at it using the getElementById() method on the document:

var embed = document.getElementById("myembed");embed.src = "http://www.mysite.com/myfile.swf";embed.width = "100%";embed.height = "45";// etc.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...