Is there a way to conditionally load a java applet? ...There are some
instances where my applet is not needed and therefore don't want the
excess overheading of loading the applet.
Any ideas?
Thanks in advance
Oliver Wong - 26 Mar 2007 16:39 GMT
> Is there a way to conditionally load a java applet? ...There are some
> instances where my applet is not needed and therefore don't want the
> excess overheading of loading the applet.
>
> Any ideas?
Perhaps by using JavaScript to only add the <APPLET> (or <OBJECT>) tag
when the condition has been met. If you want details on this approach,
though, you'd best ask a JavaScript newsgroup instead of this Java one.
- Oliver
Andrew Thompson - 26 Mar 2007 17:15 GMT
> Is there a way to conditionally load a java applet?
I'd guess so. You could always have one applet
that checks the 'conditions'* load the main applet
only if required. To load the main applet without
first caching the bytes locally though, might
require doing a direct fetch on the applet
classes.
* What are these conditions?
> ...There are some
> instances where my applet is not needed and therefore don't want the
> excess overheading of loading the applet.
What does this applet do? How often
is the end user likely to need it? Are
they likely to need it (conditionally
or otherwise) more than once? How big
is it?
(I doubt the strategy you are pursuing
is the best one, and anything non-standard
with applets, is very fragile and will
probably lead to higher application
maintenance costs..)
Andrew T.
Daniel Pitts - 26 Mar 2007 18:22 GMT
> Is there a way to conditionally load a java applet? ...There are some
> instances where my applet is not needed and therefore don't want the
[quoted text clipped - 3 lines]
>
> Thanks in advance
It depends on the condition, and what you are using to generate your
html page.
Generally, the best way to approach this is to have a link to the page
with the Applet. That way, if the user doesn't want the applet, they
don't click on the link.
Andrew Thompson - 26 Mar 2007 18:28 GMT
On Mar 27, 3:22 am, "Daniel Pitts" <googlegrou...@coloraura.com>
wrote:
..
> Generally, the best way to approach this is to have a link to the page
> with the Applet. That way, if the user doesn't want the applet, they
> don't click on the link.
Damn fine suggestion. 'User empowerment' rocks.
Andrew T.