|
|
|
|
|
| <!-- HTML File --> |
| <html> |
| <head> |
| <script src="external_script.js" language="JScript"></script> |
| </head> |
|
|
| <body> |
| <div id="EXAMPLE_DIV_ID"> |
| This text will be replaced by the control |
| </div> |
| <script language="JScript"> |
| CreateControl( "EXAMPLE_DIV_ID", |
| "clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6", |
| "EXAMPLE_OBJECT_ID", "600", "400", "example.wmv", |
| "-1") |
| </script> |
| </body> |
| </html> |
|
|
|
|
|
|
|
|
|
// external_script.js
function CreateControl(DivID, CLSID, ObjectID,
WIDTH, HEIGHT, URL, AUTOSTART)
{
var d = document.getElementById(DivID);
d.innerHTML =
'<object classid=' + CLSID + ' id=' + ObjectID +
' width=' + WIDTH + ' height=' + HEIGHT +'>
<param name="URL" value=' + URL + '>
<param name="autoStart" value=' + AUTOSTART + '/>';
}