hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Design and Content : window.close() on Firefox
Reply

Forum Jump

window.close() on Firefox

Reply Post New Thread In Web Design and Content Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-30-2008, 12:09 PM
BM136 BM136 is offline
WHT Addict
 
Join Date: May 2008
Location: USA
Posts: 108
Hello,
I created a web page include a button, and I added onclick event on the button to close the window, but the button works well on IE, but it doesn't work on Firefox
any help??

Reply With Quote


Sponsored Links
  #2  
Old 11-30-2008, 12:30 PM
JayShah JayShah is offline
Junior Guru Wannabe
 
Join Date: May 2008
Location: London
Posts: 33
Tell us what the error is? Use something like FireBug to see it if you can't already.
Jay

Reply With Quote
  #3  
Old 12-01-2008, 06:07 AM
BM136 BM136 is offline
WHT Addict
 
Join Date: May 2008
Location: USA
Posts: 108
Hi Jay,
It doesn't return any error
my code as the following:
<html>
<head>
</head>
<body>
<input type="button" value="close" onclick="window.close();"/>
</body>
</html>
I read somewhere while I was searching that in Firefox I can't close a window via javascript unless I open it via javascript

Reply With Quote
Sponsored Links
  #4  
Old 12-03-2008, 01:29 AM
HivelocityDD
Guest
 
Posts: n/a
Can you please try this
onclick=\"javascript:window.open('','_parent','');window.close();\"
This should work both with IE and firefox
Cheers !

Reply With Quote
  #5  
Old 12-03-2008, 03:15 AM
BM136 BM136 is offline
WHT Addict
 
Join Date: May 2008
Location: USA
Posts: 108
nop,
It didn't work

Reply With Quote
  #6  
Old 12-03-2008, 06:31 AM
HivelocityDD
Guest
 
Posts: n/a
If you are using older version of firefox it should work. But for higher versions above 2.2 it wont work I think.
Can you please try this
<input type="button" value="close" onclick="javascript:window.opener='x';window.close();"/>
Let me know if you have any luck with this please..

Reply With Quote
  #7  
Old 12-03-2008, 07:05 AM
BM136 BM136 is offline
WHT Addict
 
Join Date: May 2008
Location: USA
Posts: 108
no good news, not working

Reply With Quote
  #8  
Old 12-03-2008, 02:28 PM
killapix killapix is offline
Junior Guru
 
Join Date: Feb 2006
Location: top: 50px; left: 200px;
Posts: 213
I read somewhere while I was searching that in Firefox I can't close a window via javascript unless I open it via javascript
Thats correct
To use the close method in FF you must use the open method..

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
The Pirate Bay Switches to .AC ccTLD Following Domain Seizure, Pressure from Dutch Anti-Piracy Group Web Hosting News 2013-12-13 11:21:23
The Pirate Bay Helps Users Circumvent Censorship with New PirateBrowser Web Hosting News 2013-08-12 14:23:13
Phishing Attack Hosted on Malaysian Police Site with SSL Certificate Web Hosting News 2013-06-06 15:54:43
Mozilla Firefox 23 Will Block Mix SSL Content by Default Web Hosting News 2013-04-12 11:39:07
Mega Firefox Extension Speeds Up Downloads, Removes File Size Limits Web Hosting News 2014-05-01 08:22:29


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?