PDA

Click to See Complete Forum and Search --> : Setting parameters for OBJECT TAG


msdnexpert
Jan 29th, 2001, 06:41 AM
Dear all,
I have the following HTML script
<OBJECT NAME=Object parameters>
<PARAM NAME=FirstParam VALUE=1>
</OBJECT>

Is it possible to change the value of the parameter FirstParam using DHTML. I am looking at an IE 5.0 only solution. Thanks in advance.

Serge
Jan 30th, 2001, 09:08 AM
Once you give an ID to your object TAG, you can access it's properties and methods by using client scripting.
Also, since you're using IE only you can use VBScript on the client. So your code could be something like this:


<HTML>

<SCRIPT Language=vbscript>
Sub MySub
YourObject.FirstParam = 5
window.alert YourObject.FirstParam
End Sub
</SCRIPT>

<BODY>

<OBJECT NAME=YourObject ID=YourObject>
<PARAM NAME=FirstParam VALUE=1>
</OBJECT>

<BR>

<INPUT Type=Button onClick="MySub" id=MyButton>

</BODY>
</HTML>


Regards,