|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Detecting Activex objects installed in IE
Hi All,
I want to detect whether a particular activex component has been successfully installed in my IE browser. Based on this I have to choose the next web page I browse i.e. if the component has not been installed, then I should me led to an error page else normal flow. And all this has to be done using java script as the code has to be plat form independent. More info : OS -- Win XP SP2 Browser -- IE-6 Any help will be appreciated TIA Binit |
|
#2
|
|||
|
|||
|
Which activeX object do you wish to detect?
|
|
#3
|
|||
|
|||
|
How to detect IE ActiveX object is ebabled?
I'm proceeding in my project, but I found when the Internet option -> security setting -> ActiveX object set to prompt. When running JS script which invoke the ActiveX object, IE promt to ask if the ActiveX object is allow? I found there will be possibility user disabled the ActiveX and cause error in JS script. Did anyone know the way of detecting the security setting, if the user PC setting "Promt" or "enabled" for the ActiveX object?
Thank you. |
|
#4
|
||||
|
||||
|
javascript - ActiveX
You should try not to write code that depends on either ActiveX or javascript being enabled. If you can, try to write code that enhances a users experience if they have javascript and/or ActiveX, but will not break if they don't.
You can not acquire a users security settings with javascipt. You can write in try-catch error handling blocks so that if the ActiveX object is loaded and allowed the script will work, and if not, an alternate will occur (even if it's a "sorry, you must have ActiveX for this" type of thing). The ActiveX prompts are a security feature to prevent users from unkowingly allowing malicious code to run, you have to find a way to deal with this. Explaining why users should allow it should help some, as well "signing" the control certificate. |
|
#5
|
|||
|
|||
|
Quote:
Horse$hit! Sorry but that's not always the case. Ja i agree that in many cases, writing JS that could break the functionality of an app is bad but there are cases where it is just neccessary; especially on internal sites with particular active x requirements. Don't get me wrong, given that you have full control over requirements, idealism is great but it's rarely practical and expressing it as your first point isn't helpful. Finding out whether an active x is installed is pretty straight forward, you just declare it as per normal and then just check it is present. The snippet below will redirect if MSXML4 is not installed. Code:
<OBJECT id="MSXML4"
classid="clsid:88d969c0-f192-11d4-a65f-0040963251e5"
codebase="http://www..../msxml4.cab#version=4,10,9404,0"
type="application/x-oleobject"
STYLE="display: none"
standby="ww">
Alternative Text
</OBJECT>
<script>
//if msxml4 is not installed
if( !document.MSXML4 ){
document.loction.href = "SomePage.html"
</script>
}
|
|
#6
|
||||
|
||||
|
if object exists
Thanks for posting the example code. Much more helpful than my
Quote:
![]()
__________________
WP plugins - Error Reporting, Clean Options http://www.mittineague.com/dev/er.php http://www.mittineague.com/dev/co.php |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Detecting Activex objects installed in IE |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|