small bug in Mozilla MACOSX with appletLoader

Started by bobjob, June 29, 2010, 01:45:19

Previous topic - Next topic

bobjob

cookies seem to work fine in:
mozilla, iE, chrome (windows)
safari (macosx)

cant get cookies in Mozilla (macosx) workin using:
String cookie =(String)JSObject.getWindow (<NON_LOADER_APPLET>).eval ("document.cookie");

I made a dirty work around within the non loader applet:

java.util.Enumeration e = applet.getAppletContext().getApplets();
Applet perant = null;
while  (e.hasMoreElements() && (perant = (Applet)ez.nextElement()) != null) {
  applet = perant;
}
String cookie =(String)JSObject.getWindow(applet).eval ("document.cookie");


whats the best way to get the Loader applet?


kappa

hmm, its a bit unclear what you mean, but if you mean that you want the applet loaded by the AppletLoader, you can get it by AppletLoader.getApplet() method. (works from javascript too).

But for cookies your best bet is to just get applet->php to create it for you, browsers just have too make quirks when it comes to settings cookies from applets.

bobjob

Quote from: javalwjgl on June 29, 2010, 08:18:57
hmm, its a bit unclear what you mean, but if you mean that you want the applet loaded by the AppletLoader, you can get it by AppletLoader.getApplet() method. (works from javascript too).
I ment that in an applet run normally (without the applet loader). I can call "JSObject.getWindow(*)" to GET/SET cookies.
Currently I havnt found any errors with this method (as long as i set MAYSCRIPT=true inside the applet tag).

Yet when that applet is loaded by the appletLoader, there is an error on Mozilla MacOSX (1.6.0_20 32bit)

Quote
But for cookies your best bet is to just get applet->php to create it for you, browsers just have too make quirks when it comes to settings cookies from applets.
Thanks, I havnt really worked much with php (mostly copy and paste) as I havnt had need as yet.