Help ! Click Activating ActiveX Controls and Windows UserControl (hosted in IE)

Jan 3 2008 6:26 PM

Hi,

I tried with the javascript solution for Windows UserControl (C#) hosted in IE to eliminate the "Click to Activate" problem. The Windows control (C#) hosted in IE works fine without the script. But if I include javascript file with my existing code then the Windows control does not come up and in windows log files (temperory Internet files), it displays error as: "System can not find the file specified" with "Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll"

Kindly suggest some solution for this as IE ACA is not avialable for customer release for now.

I m using below javascript code :

if (navigator.appName == "Microsoft Internet Explorer") {

//Array of elements to be replaced
var arrElements = new Array(3);
arrElements[0] =
"object";
arrElements[1] =
"embed";
arrElements[2] =
"applet";
//Loop over element types
for (n = 0; n < arrElements.length; n++) {

//set object for brevity
replaceObj = document.getElementsByTagName(arrElementsNo);

//loop over element objects returned
for (i = 0; i < replaceObj.length; i++ ) {
   //set parent object for brevity
   parentObj = replaceObjIdea.parentNode;
   //grab the html inside of the element before removing it from the DOM
   newHTML = parentObj.innerHTML;
   //remove element from the DOM
   
parentObj.removeChild(replaceObjIdea);
   //stick the element right back in, but as a new object
   parentObj.innerHTML = newHTML;
   }   
}

}

email: [email protected]

Thanks,
Jitendra