944,120 Members | Top Members by Rank

Ad:
Oct 7th, 2009
0

JS window close help

Expand Post »
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
Similar Threads
Reputation Points: 38
Solved Threads: 0
Master Poster
veledrom is offline Offline
724 posts
since Apr 2008
Oct 7th, 2009
0
Re: JS window close help
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
Reputation Points: 10
Solved Threads: 6
Light Poster
beeerlover is offline Offline
40 posts
since May 2009
Oct 7th, 2009
0
Re: JS window close help
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
Reputation Points: 38
Solved Threads: 0
Master Poster
veledrom is offline Offline
724 posts
since Apr 2008
Oct 7th, 2009
0
Re: JS window close help
html Syntax (Toggle Plain Text)
  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.
Reputation Points: 10
Solved Threads: 6
Light Poster
beeerlover is offline Offline
40 posts
since May 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: how do i redirect two pages back with javascript(not a button a redirect)
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: AJAX Calender





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC