The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

disable refresh or F5

2 posters

Go down

disable refresh or F5 Empty disable refresh or F5

Post by dencey November 12th 2008, 3:00 pm

does anyone know a javascript that would disable the refresh or F5?

i'm making something like a test and i don't want the members to be able to refresh the page to play again..

i tried several scripts.. but most of them didn't work.. only one did but it disabled all the keyboard functions like arrow down.. T.T

please help...
dencey
dencey
Forumember

Female Posts : 117
Reputation : 0
Language : english

http://sujusahoe.com

Back to top Go down

disable refresh or F5 Empty Re: disable refresh or F5

Post by Adiex November 12th 2008, 3:49 pm

there is script can disable F5, but unfortunetely its only working on IE, Here script for it.
Code:
<script language="javascript">
function document.onkeydown()
{
if ( event.keyCode==116)
{
event.keyCode = 0;
event.cancelBubble = true;
return false;
}
}
</script>

Other browser such firefox or opera its still can refreshed using F5, the problem is you cant change the operating system functionality from within any browser except IE. Smile
Adiex
Adiex
Active Poster

Male Posts : 1014
Reputation : 33
Language : er?
Location : back alive & kicking xD

Back to top Go down

disable refresh or F5 Empty Re: disable refresh or F5

Post by dencey November 13th 2008, 2:24 pm

ouch! Sad

anyways.. thanks..^^
dencey
dencey
Forumember

Female Posts : 117
Reputation : 0
Language : english

http://sujusahoe.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum