473,511 Members | 15,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hot to close jsp page(browser page) with out warning window

2 New Member
i tried to close the jsp page using window.close()/self.close() it is giving warning window how to close the browser page with out warning window
Nov 18 '08 #1
5 11212
acoder
16,027 Recognized Expert Moderator MVP
This is correct, and there is a hack that could make the browser think that it's been opened by JavaScript and thus close without warning, but I don't think it works in newer browsers.
Nov 19 '08 #2
joyenjoy123
2 New Member
[HTML]<HTML>
<script type="text/javascript">
function closeme()
{
window.opener=self;
window.close();
}
</script>
<body>
<input type= "button" value= "close" onclick="javascript:closeme();">
</body>
</HTML>
[/HTML]

TRY THIS
Nov 19 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
That's one version of the hack I mentioned. Besides the obvious missing head, it doesn't work. Which browsers did you test on?

By the way, I think this warning is a good thing.
Nov 19 '08 #4
joyenjoy123
2 New Member
tested on ie

and it worked

was sitting idle

just wanted to help

forum is too good



....
Nov 19 '08 #5
acoder
16,027 Recognized Expert Moderator MVP
tested on ie
Which version of IE?
just wanted to help
Of course, you're more than welcome to do so.
Nov 19 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

10
95466
by: RonS | last post by:
Is there a way to close the present (active) window using PHP code?
2
4313
by: William Gill | last post by:
I am trying to make a simple data editor in Tkinter where each data element has a corresponding Entry widget. I have tried to use the FocusIn/FocusOut events to set a 'hasChanged' flag (if a...
2
9296
by: Simon Fletcher | last post by:
Hello there, I need a "Close Window" script ( onLoad.Close.Window() ), however i need the script so it don't come up with this annoying window: "This window is trying to close" window. Is...
1
1441
by: Mark Rigsbee | last post by:
I was wonder if anyone out there could shed some light on a problem I am having. I'm having trouble getting a javascript "window.close()" method to work when running over a shared SSL connection....
9
3226
by: Graham | last post by:
What I currently have is a page that opens another browser at 800x600, once that is loaded I would like to close the orginal page down while keeping the page that it has just opened open (To make...
6
5662
by: clequieu | last post by:
I have created a form. Within the form is a button to close the window on click and to validate as well. The close window works when it is a stand alone, but it does not work when it is embedded...
2
1631
by: OB | last post by:
I want to be able to press a button on the Browser page and close that browser window. Anybody has a sample for ASP.NET 2.0? Thanks OB
4
4551
by: abhiab54 | last post by:
Hi all, Can anyone tell me which event get generated when I close window (e.g. of Form1) by cliking on its close button 'X' on rt handside on top of window. I need to execute perticular code...
4
2541
by: Ubi | last post by:
I have a popup and I would like to capture the close window event. How can I do that in javascript? Daniele
2
8155
by: holmes86 | last post by:
hi,everyone I have a GTK window,when click "close window" ,I want to show a verify dialog that whether verify really quit or not.so I used a MesssageDialog for verify quit.But when I clicked the...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3219
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.