Jump to content

How to Send a var to a PARAM value?


heero11yuy

Recommended Posts

How to Send a var to a PARAM value?Say I have a variable of X...<HTML><HEAD><TITLE>StoryMan Personal Word List</TITLE></HEAD><script type=text/javascript>var X = 999</script><body><table><tr><td><object><param name=abc value="filename.swf?id= X " ><!-- here, I want to set id = var X... does anyone know how to do it? --></OBJECT></TD></TR></TABLE></body></HTML>

Link to comment
Share on other sites

If you want to include a variable value in the HTML, you can use document.write() to output that HTML instead. So I would think your param can be set as follows:

<script language="javascript">	document.write('<param name="abc" value="filename.swf?id=' + X + '">');</script>

Link to comment
Share on other sites

Or you could put this right before the </body> tag:

<script type="text/javascript">document.getElementsByName("abc").value="filename.swf?id="+x;</script>

That should work too :)

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...