document event not firing if used in a non-frames environment?

S

SteveSu

Hi!
I have a script which looks like this. If the script is added to a page
which is in a frameset it works fine, but if I use it in a separate
page "outside the frameset" the event is not fired at all. Why is that?

<script language=javascript>

document.onkeydown=function GoBack() {
if(event.keyCode == 27) {
__doPostBack('', 'GoBack');
}
}

</script>

Thanks in advance
/ Steve
 

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

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top