Re: Trigger Update of ActiveX Control in Javascript?
- From: "//><\\" <m s a g e n t@f l e s h p o t . n e t>
- Date: Thu, 20 Apr 2006 14:12:33 -0500
suckerformimi wrote:
Our goal here is to offer the user a chance to upgrade without making
it mandatory. AFAIK the <object> tag doesn't give us enough control.
This is why we want to _trigger_ the upgrade in javascript.
Users can use a no-download version of our product. In this case, no
ActiveX warning bar shows up. There will be a panel offering the
download version.
Users of the download version will be offered optional updates. They
will be required to upgrade if they do anything that requires new
features.
It looks like the solution involves dynamically creating and deleting
objects. We need to be able to delete the plugin object, replace the
<object> tag, and then render new javascript that will trigger the
download of a new version.
Yes. you are on the right track. you can document.createElement an object
tag and add it dynamically.
Here's one I did recently:
<script>//><\'
r={
params:{
version: "1.0.1",
args: "blah args",
launchURL: location.href
},
attributes:{
id: "ro",
valign: "top",
classid: "clsid:9ddfb297-9ed8-421d-b2ac-372a0f36e6c5",
codebase: "http://www.rebol.com/plugin/rebolb5.cab#version=0,5,0,0"//,
wmode: "transparent"
},
style: "height:80%;width:100%;background-color:black;"
}
function insertObject( doc, object ){
var tag=doc.createElement( "object" );
var param;
for( var each in object.params ){
param = document.createElement("param");
param.name = each;
param.value = object.params[each];
tag.appendChild( param );
}
for( each in object.attributes ){
tag[each]=object.attributes[each];
}
if("style" in object){
if("string" == typeof object.style){
tag.style.cssText = object.style;
}
else if("undefined" != typeof object.style ){
if("object" == typeof object.style){
for( each in object.style ){
if( each == "length" ) continue;
tag.style[each] = object.style[each];
}
}
}
}
return document.body.insertBefore(tag, document.body.all(0));
}
.
- References:
- Trigger Update of ActiveX Control in Javascript?
- From: suckerformimi
- Re: Trigger Update of ActiveX Control in Javascript?
- From: //><\\
- Re: Trigger Update of ActiveX Control in Javascript?
- From: suckerformimi
- Trigger Update of ActiveX Control in Javascript?
- Prev by Date: how to set event handler
- Next by Date: Re: createElement and removeNode
- Previous by thread: Re: Trigger Update of ActiveX Control in Javascript?
- Next by thread: Determine if running local or remote.
- Index(es):
Relevant Pages
|