This is not strictly a java question; but i've run out of sources to locate
any decent information. having scoured the javascript 'Rhino' book from end
to end and exhausted myself with countless trial code and web searches.
I have a JSP/J2EE application which runs in a window, 'A'. It has two
frames, 'A.f1' (a menu) and 'A.f2' (the actual app).
In the menu, A.f1, there is a link to an external application provided by a
third party. This is opened in a second window, B. B has two frames, B.f1,
and B.f3. B.f1 is (moreorless) just the same basic menu as A.f1.
In B.f3, is an APPLET which is provided totally by the 3rd party off their
servers and not under my control.
In the menu in A.f1, there is held a javascript reference to the window B.
This is used, so that if the user clicks the link to the applet a second
time, the window B is detected as already loaded and it is just brought into
focus, rather than reloading the whole applet over again and reinitialising
it. Also there is code (javascript) running in B that detects if A is closed
and then closes B, to stop B being open if A is not.
So far, so good.
The _problem_ comes with the fact that within the applet, the 3rd party has
provided a menu function that allows the applet to link back to our JSP
application. Because of 'sandboxing' of the applet, or some other reason,
they can only load the supplied URL into the _top_level_ of the window, A.
So they can't specify 'A.f2' as the target, only 'A'.
This causes the menu in A.f1 of course to be reloaded, and therefore lose
the reference to window B. So the next time the click on the link, B is
completely reloaded rather than just being brought into focus, and the
applet reinitialises. I can't seem to find anyway to make that reference
persistent.
The issue with JAvascript is that it can only 'see' windows that it opens
itself and stores in a variable, I can't discover independently if a target
already exists before I use the 'open' method. I've tried countless
variations, all have some idiotic fatal flaw. I won't outline them here
because it would turn this email into an epic of truly massive proportions;
they usually involve independent controller windows and suchlike.
Can someone outline any potential solutions, or point me to a website or
other resource which might discuss such advanced Javascript programming? Any
solution we sould perform on the server-side would be appreciated also.
regards + thanks
scot.
___________________________________________
Scot Mcphee - Snr Developer
- (mobile) +61-412-957414
___________________________________________
Tigerex - http://www.tigerex.net
- (bus) +61-2-82593613
___________________________________________
To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm