View Full Version : close window
mir4kir
10-10-2008, 01:45 PM
any script that when i put a refresh page script and when page refresh its close the page automatic
rangana
10-11-2008, 02:26 AM
<input type="button" value="Refresh" onclick="location.reload();window.close();">
Also note that on FF, you cannot close a page when it's not opened by a script.
Hope that helps.
mir4kir
10-11-2008, 05:17 PM
its ask permission to user i want auto close and no button just my page refresh after 30nd and close the window
magicyte
10-11-2008, 05:38 PM
Yes. It tends to do that. However, you could make a function that loops to check if the user wants to close the page. If the user says no, the function would loop again, thus trying to close the window. This may be annoying, but for your purpose, I do not know. Ask me for code if you are interested in what I said.
-magicyte
mir4kir
10-11-2008, 07:05 PM
sir i set i page refresh script on the its refresh page after 60nd i want or after 60nd window will close auto when page refresh or its redirect to any other page
magicyte
10-11-2008, 08:24 PM
If this is what you want, it is impossible to accomplish with JavaScript or any client-side script.
I am truly sorry.
-magicyte
mir4kir
10-11-2008, 10:03 PM
if the client click on refresh the page auto redirect is it passable?
rangana
10-12-2008, 02:32 AM
if the client click on refresh the page auto redirect is it passable?
location.href='http://www.google.com'
mir4kir
10-12-2008, 09:14 AM
this code nt working
\
rangana
10-13-2008, 07:46 AM
Then probably, there's something wrong on how you set it up.
For further reading:
http://www.w3schools.com/htmldom/prop_loc_href.asp
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.