Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Load the applet only if the activeX component could not be found?

 
Zen Goh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Currently, the login page of my web application will load a activeX component in order to access a desktop application installed on the client's PC. There is a ongoing change in the login procedure, we will be using applets instead. The problem is, I have to provide support for logging in using the activeX components as well for the transition period of 6 months.

Is there a way to load the applet or an activeX alternatively on the same jsp using the OBJECT tags? (ie. if the activeX component could be loaded, then do not load the applet. If the activeX component is not present then load the applet.)

I tried using nested OBJECT tags but its seems like the browser will try to load both objects. It prompted the warning that the webpage is trying to run a ActiveX component and after clicked on 'Ok' it tries to load the Applet as well.

<!-- Try to load ActiveX first -->
<OBJECT type="application/x-oleobject" ID="ActiveXLogin" CLASSID="clsid:xxxxxx" CODEBASE='/ocx/login.ocx' WIDTH="0" HEIGHT="0">
<!-- Load Applet if the ActiveX could not be found -->
<OBJECT CODEBASE='http://devt/applet' CODE='Applet/Login'
width='0' height='0' ARCHIVE='Login.jar' NAME=Login >
<PARAM NAME="legacy_lifecycle" VALUE="true">
</OBJECT>
<!-- End Applet -->
</OBJECT>
<!-- End ActiveX>

Thanks for any suggestions/advice!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic