JimV_ATL
asked on
Soft Failure for saying No to Active X warning or if Disabled in Security.
The following script works fine for me:
<html>
<head>
<title></title>
<script>
onload = function() {
var objXL = new ActiveXObject("Excel.Appli cation")
alert(objXL.version)
objXL.Quit()
}
</script>
</head>
<body>
</body>
</html>
Say someone returns "no" to an active x security prompt or activex is disallowed entirely, I would like the above script to have a soft failure...i.e. alert('Failed');
How might I do that?
<html>
<head>
<title></title>
<script>
onload = function() {
var objXL = new ActiveXObject("Excel.Appli
alert(objXL.version)
objXL.Quit()
}
</script>
</head>
<body>
</body>
</html>
Say someone returns "no" to an active x security prompt or activex is disallowed entirely, I would like the above script to have a soft failure...i.e. alert('Failed');
How might I do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
GPH's is not the answer I was looking for, however, as he made the effort to repond, I'm awarding him the points.
See my comment above for the answer.
See my comment above for the answer.
Cool, I didn't think that would work.
<html>
<head>
<title></title>
<script>
IE5 = (document.all && document.getElementById)?t rue:false;
function function1() {
if (IE5) {
try {
var objXL = new ActiveXObject("Excel.Appli cation");
myversion = objXL.version;
objXL.Quit();
} catch(err) {
myversion = 0;
} finally {
alert(myversion);
}
}
}
</script>
</head>
<body onload="function1();">
</body>
</html>
I don't want any points for that because you found the answer
<html>
<head>
<title></title>
<script>
IE5 = (document.all && document.getElementById)?t
function function1() {
if (IE5) {
try {
var objXL = new ActiveXObject("Excel.Appli
myversion = objXL.version;
objXL.Quit();
} catch(err) {
myversion = 0;
} finally {
alert(myversion);
}
}
}
</script>
</head>
<body onload="function1();">
</body>
</html>
I don't want any points for that because you found the answer
to late :) thatnk you
ASKER
<html>
<head>
<title></title>
<script>
function function1() {
try {
var objXL = new ActiveXObject("Excel.Appli
myversion = objXL.version;
objXL.Quit();
} catch(err) {
myversion = 0;
} finally {
alert(myversion);
}
}
</script>
</head>
<body onload="function1();">
</body>
</html>