PDA

View Full Version : instant close window



andr.in
April 26th, 2003, 06:24 AM
How to close a browser window if a link is clicked without it asking if I want it to be closed!
this one pops up a message:

<a href="javascript:window.close()"></a>
Lost? You use it on your page! howwww? =)

Alex
April 26th, 2003, 09:31 AM
<A HREF='javascript:close(0)'>Close Window</A>

andr.in
April 26th, 2003, 11:27 AM
hm... it like tries to go somewhere but it says the link cannot be displayed!v :-\

lostinbeta
April 26th, 2003, 11:48 AM
Theres a weird bug with the forum where it changes javascript: to about : when the PHP tags are used. It is a weird issue and Kirupa doesn't know how to solve it.

Anywho... you can't.

If the close link is on the main window, then you will always get that warning. There used to be a way to get rid of it in earlier IEs, but as of IE6 they removed it saying it was a "Security Risk" (bull) so you can't do it anymore. My site has the ability to do it because the close links are in windows that I opened _blank from the main window.

andr.in
April 26th, 2003, 11:58 AM
ok but if i open them in _blank too!
What exactly do I have to use?

and wierd bug!

lostinbeta
April 26th, 2003, 11:59 AM
The same one you used before.

andr.in
April 26th, 2003, 12:06 PM
oh.... oohh.... thx! =) it's workin'