Thanks, It works fine, I tried something different and it didn't worked:
parent.frames["frameName"].reload();
It reloaded the entire page
Once again thank you very much
Pinho
> Well, add this to your code, it should do the trick:
parent.frames["frameName"].location.reload();
/Robert
-----Ursprungligt meddelande-----
Fr=E5n: Lu=EDs Pinho [mailto:lspinho@m...]=20
Skickat: den 7 november 2002 14:31
Till: JavaScript HowTo
=C4mne: [javascript_howto] Control the F5 behavior in a page that has
FRAMES
Hi there,
I can capture the event of pressing F5 in a page with FRAMES using a=20
code posted in this site:
*********** Begining **********
<SCRIPT>
if (document.all)
{
document.onkeydown =3D function ()
{
var key_f5 =3D 116; // 116 =3D F5
if (key_f5=3D=3Devent.keyCode)
{
event.keyCode=3D0;
alert (event.keyCode+" F5 was press!");
return false;
}
}
}
</SCRIPT>
*********** End ***********
This piece of code disables the F5 key, it prevent a person from=20
refreshing a page using F5 key.
I want to do something diferent, when a user presses F5 instead of=20
refreshing the entire frameset, I want to refresh a particular frame=20
(simulate: right-click within the frame and choose Refresh from the
pop-up=20
menu)
Thank You
Pinho
---
Change your mail options at http://p2p.wrox.com/manager.asp or=20
to unsubscribe send a blank email to