473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Event KeyCode for Alt-F4

Hi all,

I want keyCode for (alt+F4). actually i want to end session whenever browser window is getting closed. it is working when we close window using close button(X).
if any of you have this idea please provide as early as possible because its urgent.
Thanks
Jun 29 '07 #1
10 16141
acoder
16,027 Expert Mod 8TB
Use altKey to detect the Alt key and F4's keycode is 115.
Jun 29 '07 #2
acoder
16,027 Expert Mod 8TB
Changed thread title to mention Alt-F4
Jun 29 '07 #3
Changed thread title to mention Alt-F4
Thanks,
My issue is solved and i have posted those codes inside article.hope it will helpfull for people like me.
Jun 29 '07 #4
mylog
20
@kpranjan1

Where is the article??
Jun 3 '09 #5
acoder
16,027 Expert Mod 8TB
I'm not sure which article the OP was referring to. Are you having problems detecting the Alt-F4 combination?
Jun 3 '09 #6
mylog
20
@acoder
Yes I want to disable the alt+F4 function for the web browsers
Do you have any good working stuffs for this issue??
Jun 3 '09 #7
acoder
16,027 Expert Mod 8TB
Before we get started, what's the reason? Is it because you want to cancel the session, or to prevent data loss?
Jun 3 '09 #8
mylog
20
@acoder
First I want to end the session and then delete some files at the server end
Jun 3 '09 #9
Frinavale
9,735 Expert Mod 8TB
I know it's not supported in Opera, but have you considered using the onbeforeunload event to send an Ajax request to do session/data clean up?

See this post for an example of how send an Ajax request to log out a user.
Jun 3 '09 #10
mylog
20
thank u it was a great help
Jun 4 '09 #11

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

Similar topics

3
by: Matthias Knöchlein | last post by:
hi !! I have the following problem : Is there a function or a constant value to check if a keyCode is a key kile "Shift", "Alt" or "F1". I would like not to use this way : if( ...
6
by: rich_poppleton | last post by:
Help.... I've got a textarea where people type in a description. However for certain reasons we need to stop them typing !$*^ . I have a solution this which works fine in IE: function...
4
by: Tim | last post by:
Hi Guys, I want to know how to tell if the shift key is held down when another key is pressed. I am using the following code to make sure that only numbers, backspace and decimal are allowed...
10
by: Rob Nicholson | last post by:
In our application, we've added a bit of JavaScript that updates a title as the user types into a textbox. To trigger this, we patch into the "onkeyup" and "onpaste" events: ...
10
by: Tim Frawley | last post by:
I am attempting to detect a Shift+Tab in the KeyPress event for back navigation on a control that doesn't support this method. Does anyone have any ideas how to compare e.KeyChar to a ShiftTab? ...
8
by: Nathan Sokalski | last post by:
I add a JavaScript event handler to some of my Webcontrols using the Attributes.Add() method as follows: Dim jscode as String = "return (event.keyCode>=65&&event.keyCode<=90);"...
4
by: Claudia Fong | last post by:
I use keypress event to detect the characters users input, but it doesn't work with Alt tab.. I need to detect the combination Alt-A or Alt-F1.. how should I do? The code is below: private...
4
by: Claudia Fong | last post by:
Hi, in my C# application I have the following keydown event private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.A)...
3
by: GS | last post by:
apparently the following in keyDown event fails to capture the alternate key down Private Sub cbAddressBar_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
0
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...

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.