G
Grant H.
hi all,
i have a strange problem here & i'm not sure how to go about fixing
it. Basically, I have a page with an activex control that gets launch
with JS when a user clicks a "connect" button. Now, all i want to do
is disable the button & change the text while the activex is loading.
now, the code below should work, but what i'm seeing is that the js
doesn't even start executing until the activex is loaded. so, what i'm
expecting is the js to run down the function sequentially so:
-the first 2 lines disable & change the text of the button
-the active loads (the button is still disabled)
-activex done load & i re-enable the button.
what actually happens is: when i hit the button, it sits there & loads
the activex, then runs down the function so the disable & re-enable of
the buttons go really fast. any help would be appriciated!
thanks!
-grant.
<object id="MyAppLaunch" type="application/x-oleobject"
classid="CLSID:8E0FDFBC-77D4-43a1-9AD4-41F0EA8AFF7C"
codebase="myapp.cab#version=2,1,0,1">
</object>
<script language="javascript">
<!--
function DoIt()
{
document.form1.Connect.value = "Please Wait...";
document.form1.Connect.disabled = true;
try{
MyAppLaunch.Launch(1,2,3,4,5);
}catch(oException){window.location.href="myapp.exe";}
}
document.form1.Connect.value = "Connect";
document.form1.Connect.disabled = false;
}
-->
</script>
i have a strange problem here & i'm not sure how to go about fixing
it. Basically, I have a page with an activex control that gets launch
with JS when a user clicks a "connect" button. Now, all i want to do
is disable the button & change the text while the activex is loading.
now, the code below should work, but what i'm seeing is that the js
doesn't even start executing until the activex is loaded. so, what i'm
expecting is the js to run down the function sequentially so:
-the first 2 lines disable & change the text of the button
-the active loads (the button is still disabled)
-activex done load & i re-enable the button.
what actually happens is: when i hit the button, it sits there & loads
the activex, then runs down the function so the disable & re-enable of
the buttons go really fast. any help would be appriciated!
thanks!
-grant.
<object id="MyAppLaunch" type="application/x-oleobject"
classid="CLSID:8E0FDFBC-77D4-43a1-9AD4-41F0EA8AFF7C"
codebase="myapp.cab#version=2,1,0,1">
</object>
<script language="javascript">
<!--
function DoIt()
{
document.form1.Connect.value = "Please Wait...";
document.form1.Connect.disabled = true;
try{
MyAppLaunch.Launch(1,2,3,4,5);
}catch(oException){window.location.href="myapp.exe";}
}
document.form1.Connect.value = "Connect";
document.form1.Connect.disabled = false;
}
-->
</script>