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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top