Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turn ActiveXObject into HTML <OBJECT>

Status
Not open for further replies.

pcawdron

Programmer
Jun 14, 2000
109
AU
Does anyone know how I can use the...

var X = new ActiveXObject("ProgID")

...and then make X a real object within my HTML page? So I can change it's size, z-index, etc?

The ActiveXObject I'm using does not have z-index, if I set it as an <OBJECT> I have access to z-index, but not if I create it on the file in javascript.

Thanks,

PS. Please reply to peter_cawdron@hotmail.com (I'm on holiday :)
 
hi pcawdron,

you might be able to combine both by using document.write() and inserting any variables necessary. this would have to be done during page load, not by calling a function after loading since write() replaces the document's contents.

just insert this in the page where you want the object to appear:

<script language=&quot;javascript&quot;>
parName = &quot;something&quot;;
parVal = &quot;whatever&quot;;
document.write('<OBJECT>');
document.write('<PARAM name=&quot;'+parName+ '&quot; value=&quot;'+parValue+'&quot;>');
</script>

hope this helps... =========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top