JS window close help

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Apr 2008
Posts: 507
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro

JS window close help

 
0
  #1
Oct 7th, 2009
Hi,

This code doesn't work in Firefox? Is there any other way of closing window?

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <A href="javascript: self.close ()">Close this Window</A>

Thanks
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 40
Reputation: beeerlover is an unknown quantity at this point 
Solved Threads: 6
beeerlover's Avatar
beeerlover beeerlover is offline Offline
Light Poster
 
0
  #2
Oct 7th, 2009
Javascript can only close windows that were opened using Javascript in FF without modifying the config. To change your config to allow this:
go to "about:config"
and set the value of "dom.allow_scripts_to_close_windows" to true.

To make your windows close in FF (and IE7) browsers without modifying the config here is a nice workaround
www.bestbridalprices.com <- my job with 15K+ Wedding Dresses
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 507
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro
 
0
  #3
Oct 7th, 2009
Nice workdaround didn't work.

As there i lot of people use this service dom.allow_scripts_to_close_windows doesn't look helpful.


Any other ways?

Thanks
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 40
Reputation: beeerlover is an unknown quantity at this point 
Solved Threads: 6
beeerlover's Avatar
beeerlover beeerlover is offline Offline
Light Poster
 
0
  #4
Oct 7th, 2009
  1. <a href="javascript:window.close();">Close Window</a>
is all you really need to close the window in any browser, but as stated above the window will need to be opened by JavaScript to be closed by it.
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC