applet "interrupts" webpage navigation

  • Thread starter Thread starter boku.ronin
  • Start date Start date
B

boku.ronin

hi all,

i've written a small applet that runs next to the browser and provides
kind of a notepad-functionality (logging the webpages the user is
visiting).
whenever the user changes webpage, the applet is (of course
)stopped/destroyed and then reinitialized. so far, so good; i've
written the applet as singleton so that it preserves its data between
the reloads.

my problem is that the applet seems to temporarily "steal" the focus
from the browser (when it is stopped and reinitialized), interrupting
the navigation to the new webpage; i.e., the user usually has to press
the navigation-buttons several times before the browser goes to the new
webpage.
An example: if I'm on a webpage and want to go back to the previous one
(and i'm thus pressing the back-button of the browser), i see that the
applet is re-initialized (appears that the browser has notified the JVM
of an imminent webpage change), but the browser then remains on the OLD
webpage (i.e., does not load the new webpage).

any idea how i could solve this problem ? (i've tried to insert a
Thread.sleep command in the stop/destroy function of the applet, hoping
it would pause the applet long enough to give the browser time to go to
the new webpage before the applet is reloaded, but it didnìt work...)

any help is really appreciated...
Thanks in advance,
Chris
 
Hi Boku,

When are you destroying/creating your applet. On the BeforeNavigate,
NavigateComplete or DocumentComplete events? Seems to be a timing problem.
Put a debug on the OnError event also to see how to handle navigation errors
also.

Regards.
hi all,

i've written a small applet that runs next to the browser and provides
kind of a notepad-functionality (logging the webpages the user is
visiting).
whenever the user changes webpage, the applet is (of course
)stopped/destroyed and then reinitialized. so far, so good; i've
written the applet as singleton so that it preserves its data between
the reloads.

my problem is that the applet seems to temporarily "steal" the focus
from the browser (when it is stopped and reinitialized), interrupting
the navigation to the new webpage; i.e., the user usually has to press
the navigation-buttons several times before the browser goes to the new
webpage.
An example: if I'm on a webpage and want to go back to the previous one
(and i'm thus pressing the back-button of the browser), i see that the
applet is re-initialized (appears that the browser has notified the JVM
of an imminent webpage change), but the browser then remains on the OLD
webpage (i.e., does not load the new webpage).

any idea how i could solve this problem ? (i've tried to insert a
Thread.sleep command in the stop/destroy function of the applet, hoping
it would pause the applet long enough to give the browser time to go to
the new webpage before the applet is reloaded, but it didnìt work...)

any help is really appreciated...
Thanks in advance,
Chris
 
Back
Top