/    Sign up×
Community /Pin to ProfileBookmark

Problem with ctrl+N

Hi,

Is there any body come across the problem of ctrl+N. Its making issue with session. If there any body handled this event please let me know.

Thank you for going though my issue.

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@_Aerospace_Eng_Dec 12.2006 — You posted no code and your explanation of your problem is pretty vague. How do you expect us to help? Explain yourself better.
Copy linkTweet thisAlerts:
@salinioct2authorDec 12.2006 — Hi,

I want to control ctrl+N as its opening the same session.

I want to redirect to some othe page.
Copy linkTweet thisAlerts:
@salinioct2authorDec 12.2006 — I dont want to open the same page with ctrl+N short cut.
Copy linkTweet thisAlerts:
@salinioct2authorDec 12.2006 — if I am able to do it throgh javascript it will be easier for me.
Copy linkTweet thisAlerts:
@_Aerospace_Eng_Dec 12.2006 — No you can't. Its a browser function. Nothing you can do about other than check to see if the session is already set. If its do nothing, if not then set it.
Copy linkTweet thisAlerts:
@salinioct2authorDec 12.2006 — I got the solution...

It will wrok in IE.. I should check for others.

<html>

<head>

<title></title>

</head>

<body>

</body>

</html>

<script language="JavaScript">

document.onkeydown = function(){

if ((event.keyCode == 78) && (event.ctrlKey))

{

window.open("sss1.htm")

event.cancelBubble = true;

event.returnValue = false;

event.keyCode = false;

return false;

}

}

</script>
×

Success!

Help @salinioct2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...