Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 6th, 2005, 07:27 AM
Registered User
 
Join Date: Dec 2005
Location: Dubai, , United Arab Emirates.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to arif007khan Send a message via Yahoo to arif007khan
Default Disable browser F5 Key

How can we disable browser F5 Key or menu "Refresh" option?
Reply With Quote
  #2 (permalink)  
Old December 13th, 2005, 12:10 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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>

Reply With Quote
  #3 (permalink)  
Old December 13th, 2005, 12:16 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #4 (permalink)  
Old December 13th, 2005, 12:29 AM
Registered User
 
Join Date: Dec 2005
Location: Dubai, , United Arab Emirates.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to arif007khan Send a message via Yahoo to arif007khan
Default

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 :)
Reply With Quote
  #5 (permalink)  
Old December 13th, 2005, 04:50 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
Reply With Quote
  #6 (permalink)  
Old December 13th, 2005, 05:40 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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">


Reply With Quote
  #7 (permalink)  
Old December 13th, 2005, 08:27 AM
Registered User
 
Join Date: Dec 2005
Location: Dubai, , United Arab Emirates.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to arif007khan Send a message via Yahoo to arif007khan
Default

:) Thanks i got it
Reply With Quote
  #8 (permalink)  
Old December 13th, 2005, 08:38 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
  #9 (permalink)  
Old March 27th, 2007, 10:29 AM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Clicking f6 and than f5 is a way to get F5 to work again as user. Anybody has an idea to avoid this?

Reply With Quote
  #10 (permalink)  
Old March 27th, 2007, 01:51 PM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
disable browser right click?? danielnixon HTML Code Clinic 1 May 19th, 2008 12:11 PM
Disable the [SHIFT Key] on Startup ru1 Access 4 September 22nd, 2007 09:27 PM
Disable F10 key in IE chrscote Javascript 1 March 21st, 2006 06:23 AM
how to disable enter key for a particular button g_vamsi_krish ASP.NET 1.0 and 1.1 Professional 1 January 19th, 2006 10:22 AM
How do I disable a key in vba in word? nesplb Pro VB 6 0 August 1st, 2003 01:44 AM



All times are GMT -4. The time now is 12:35 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.