 |
| Javascript How-To Ask your "How do I do this with Javascript?" questions here. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

December 6th, 2005, 08:27 AM
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Disable browser F5 Key
How can we disable browser F5 Key or menu "Refresh" option?
|
|

December 13th, 2005, 01:10 AM
|
|
Authorized User
|
|
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
I Don't know about disabling REFRESH in the browser but as to disable the F5 key, write this script in the head section :
<script language=javascript>
document.onkeydown = function(){
if(window.event && window.event.keyCode == 116)
{ // Capture and remap F5
window.event.keyCode = 505;
}
if(window.event && window.event.keyCode == 505)
{ // New action for F5
return false;
// Must return false or the browser will refresh anyway
}
}
</script>
|
|

December 13th, 2005, 01:16 AM
|
|
Authorized User
|
|
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry i forgot to write the source of this script:
http://lists.evolt.org/archive/Week-...24/116284.html
For the moderators of the site : I hope that we will have the possibility to edit our posts, thanks.
edit, Sorry, i wasn't signed in, thank you joefawcett,i didn't know about.
|
|

December 13th, 2005, 01:29 AM
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Thanks Thanks!!!
I got this one but still i wants to know about the Browser "View Menu" > "Refresh" Disable and right click menu "Refresh" disable. Can you please provide me that code.
Again Thanks for co-operation :)
|
|

December 13th, 2005, 05:50 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Quote:
quote:
For the moderators of the site : I hope that we will have the possibility to edit our posts, thanks.
|
There is an edit icon above the post, available only to moderators and the original poster.
--
Joe ( Microsoft MVP - XML)
|
|

December 13th, 2005, 06:40 AM
|
|
Authorized User
|
|
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks so much joefawcett,
and arif007khan you are welcome, this is rightclick disabled, but sorry for view>source i didn't find it yet,
I have tried it and it is amasing, I saw it on: http://www.nukecops.com/postlite2727...ightclick.html
It disables rightclick select and dragdrop (click an image drag it onto the desktop or MS word...)
<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
|
|

December 13th, 2005, 09:27 AM
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
:) Thanks i got it
|
|

December 13th, 2005, 09:38 AM
|
|
Authorized User
|
|
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
You are welcome, I don't understand what you got? The view>source block?
If so please i would love to have it!
Tnaks in advance.
|
|

March 27th, 2007, 10:29 AM
|
|
Registered User
|
|
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Clicking f6 and than f5 is a way to get F5 to work again as user. Anybody has an idea to avoid this?
|
|

March 27th, 2007, 01:51 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just to add something to that f5 thing.
You can also just disable javascipt.
__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.
|
|
 |