Click to See Complete Forum and Search --> : who can kill this window? using JavaScript


atillaselem
09-10-2003, 08:05 AM
hi,
i have a java applet being used in my application. but when someone right clicks on one of the menu items it pops up a new window and tries to connect to a web page on internet.
Since my web application is on a Local Area Network it tries and fails...
How can i kill that window using JavaScript?
is that possible to kill that window although source of it is a Java Applet?
i don't have source code of that Applet...

but i think i would be able to kill poping windows in my browser using DOM...

thanks for ur help

atilla.selem


__________________

Khalid Ali
09-10-2003, 09:30 AM
yes you should be able to do that atilla.
Here is how,
typically Java applet opens a window using

window.open()

se where you have that code and then and then just comment out that line...:D

atillaselem
09-11-2003, 01:53 AM
how can i check it out?
i do not have the source code of that Applet...

do u mean that it emites Javascript code and i can find
window.open() somewhere?

sorry but i could not understand what u mean...

please tell me in detail...

thx.

atilla.

ovisopa
09-11-2003, 03:25 AM
try to insert in your page a javascript which will disable rightclick or you can try something more complicated by using an trasparent gif as background in a div. But you must align the div perfectly over the aplet and I think you will not be able to make any click at all in the applet window.

if you have any problem... tell us :)

see ya