How disable the F5 key in Mozilla

P

prado

Hi,
I am trying to disable the F5 key in Mozilla. I have the next code in
javascript that it is working in Internet Explorer but it is not
working in Mozilla. how can I disable the F5 key in Mozilla?

<script>
document.onkeydown = function(){

if(window.event && window.event.keyCode == 116){
window.event.keyCode = 505;
}
if(window.event && window.event.keyCode == 505){
return false;
}

}

</script>
 
M

Michael Winter

I am trying to disable the F5 key in Mozilla.

Well, stop that then and fix the real problem, instead.

If refreshing breaks something, then attempting to prevent that action
doesn't fix anything. More importantly, you'll never really succeed:
there are other means besides F5, including other keystrokes, and it
will clearly do nothing for users with scripting disabled.

Finally, have you thought the consequences through properly? If a
document doesn't load completely due to network problems, but sufficient
data comes through to disable refreshing, what do you think the user
will do if they can't reload?

[snip]

Mike
 
P

prado

I can not disable F5 key in Mozilla. I have tried it but it don't work.
Can you help me, please?
 
R

Randy Webb

prado said the following on 6/2/2006 8:27 AM:
I can not disable F5 key in Mozilla.
Good.

I have tried it but it don't work.

And that is how it should be.
Can you help me, please?

Redesign your app so that F5 doesn't fubar it.
 
V

VK

prado said:
I can not disable F5 key in Mozilla. I have tried it but it don't work.
Can you help me, please?

The linked solution does work - unfortunately - even for the latest FF
1.5.0.4
Today later I'll file a bug to bugzilla so they fix it (unless there
are volunteers to do it immediately ?)
 
R

Randy Webb

VK said the following on 6/2/2006 3:46 PM:
The linked solution does work - unfortunately - even for the latest FF
1.5.0.4

No, it does not "work" at all.
Today later I'll file a bug to bugzilla so they fix it (unless there
are volunteers to do it immediately ?)

To fix what? The ineptness of webpage authors that can't write a decent
app that won't die if the F5 key is pressed? Good luck with that but I
don't think filing with bugzilla can fix that problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top