Hi all,
I need some help with this issue i have been having for quite a while. I have an application running as an applet and run on a browser. The applet has a button which is an Exit button. This button should close the applet and consequently close the browser it is running it. The browser has to option eith being the parent or else a pop up..depends on the settings of the client.
I first tried it out by applying
and it worked great though the only disappointment is that the all the browsers (ie parent + child) closes down.
Then i tried using the JSObject which had the following:
this worked in IE6/7 but Firefox it crashed or rather due to security circumstances it gave me the following javascript error:
My question is...is there another method used by you guys where applets are involved?
Thanks for your considerations
Nick
I need some help with this issue i have been having for quite a while. I have an application running as an applet and run on a browser. The applet has a button which is an Exit button. This button should close the applet and consequently close the browser it is running it. The browser has to option eith being the parent or else a pop up..depends on the settings of the client.
I first tried it out by applying
Code:
this.exit();
and it worked great though the only disappointment is that the all the browsers (ie parent + child) closes down.
Then i tried using the JSObject which had the following:
Code:
JSObject win = (JSObject)JSObject.getWindow(DownloadClient.this);
win.eval("window.close();");
win = null;
this worked in IE6/7 but Firefox it crashed or rather due to security circumstances it gave me the following javascript error:
Code:
Scripts may not close windows that were not opened by script.
My question is...is there another method used by you guys where applets are involved?
Thanks for your considerations
Nick