Andrew T. said:
Thanks for responding Andrew.
I'm sorry, but it is a customer owned 'closed'
system, so I can't give any.
I also need to correct some information. I was
dragged into this when one of our other programmers
hit the problem, so my first info wasn't entirely accurate.
calling an applet-methods fail in 1.4.2 too, as long as the applet
or its container's visibility is set to hidden.
The case/problem we enconter is:
(Imagine a applet containing ie. a JTable
for entering bids, et.c)
When the user click on a link to enter new bids, the applets
container is set to visible, and on the following line,
one of the applet's methods are called:
//JS-code (IE 6.0)
var gridApplet = document.getElementById('gridapplet');
document.getElementById('mainContentPane').style.visibility = 'visible';
gridApplet.initMarket(market);
in 1.4.2, the above worked, but in 1.5 the call to initMarket(...) fails.
BUT! if we introduce a small delay between making it visible and calling
the method, it works with the 1.5 plugin too.
I've done a little research, and it turns out that IE doesn't call an
applet's init() and start() methods at page load/parse time if it determine
that the applet or its container is hidden. The Applet is initialized
first when it is made visible. (Firefox initializes the applet at page load,
regardless of it's visible state).
It seems like jre 1.5 plugin needs a little more time to 'wake up' before
you can call any of the applet's methods...?
Is it a security problem? (Make sure you check both
JS and Java consloles)
Have done so, nothing. Our Applet is signed, and given full privileges.
It *might* be that the developer have swallowed one or more
exceptions, but he promised me he had not... :-\
A third including the applet with a width/height of 0
might also be interesting.
That will work, because in that case the applet is 'visible', and already
initialized.
The reason we want to avoid this, is the ugly flashing that occurs when
one resizes the applet from 0 to its full size.
Thanks for your interest and tips...