My code works beautifully with OWC 9.
Now my requirement is to add functionality if the user has OWC 11.
If the user has version 11 then the HTML for that object is displayed
otherwise if the user has version 9 then the HTML object for version 9 is displayed.
If the user has neither then an error is displayed.
Two questions:
1. How do i determine version (javascript)?
2. What do I use for FREEZEPanes in version 11.
Thanks,
jmv
Is there a way to determine the OWC version on the client without using the registry?
What I am currently doing is having the HTML for the OWC 11 already on the page. When I go to access it (say change the caption) if it fails then I use document.write to output the HTML for the OWC 9 version.
The problems I have with this is that there is, when there is no OWC 11 installed, I get a blank square where the OWC 11 control should be. Also, my code that is used to modify the control values does not seem to recognize the created OWC 9 object.
Thanks again for your help,
jmv
function CheckForOWCVersion9()
{
document.thisForm.owcversion.value = "-1";
try
{
var xObj9 = new ActiveXObject("OWC.Spreadsheet");
if (xObj9==null)
{
document.thisForm.owcversion.value = "-1";
}
else
{
document.thisForm.owcversion.value = "9";
}
}
catch (ex)
{
document.thisForm.owcversion.value = "-1";
}
}
function CheckOWCVersion()
{
document.thisForm.owcversion.value = "-1";
try
{
var xObj11 = new ActiveXObject("OWC11.Spreadsheet");
if (xObj11==null)
{
CheckForOWCVersion9();
}
else
{
document.thisForm.owcversion.value = "11";
}
}
catch (e)
{
CheckForOWCVersion9();
}
}