Client socket code runs again when I close (IE ONLY)
Hi, I抦 making a client / server socket program and Im also using a lot of DHTML and JavaScript.
Here is my problem:
The user interacts with the JavaScript enabled widgets. These widgets talk to applets. The applets talk to the server via sockets. When the user is finished with each widget, they can close the widget, which will ask the applet to close the persistent (while (true)) socket to the Server.
A piece of JavaScript initiates the closing by detecting the user pressing close which calls a method in the Applet to close the connection. In FireFox this is absolutely fine. But when I do this in Internet explorer, it calls the method and closes the connection, but as soon as it has done so, the applet starts at the beginning of the code and then re-establishes another connection. So in FF the applet no longer exists (or appreas not to) but in IE the applets starts over again.
Each applet runs a thread that does the socket communication with the server. When I call stop on the main applet, the main applet tells the thread to set the while(true) value to false so to stop to loop.
But why on earth does the applet start again? It runs every bit of code like its loading up for the first time? How can this be? And why does it happen only in IE and not in FF. In IE the connections only properly end if I reload the page or close the browser. Please help, getting soar lumps on head where banging on table which I also just broke with my foot.
Graham

