onfocus event on Firefox

C

Confused

I'm having a problem with Firefox 2.0.0.14 on Windows XP Professional.
When I try putting an onfocus event on a page it just keeps looping
indefinitely. Has anyone else had problems with this?

Example code:

<script language="javascript">
function announce()
{
alert('Hi!');
}
</script>
..
..
<body onfocus="announce()">
etc.
 
B

Bjoern Hoehrmann

* Confused wrote in comp.lang.javascript:
I'm having a problem with Firefox 2.0.0.14 on Windows XP Professional.
When I try putting an onfocus event on a page it just keeps looping
indefinitely. Has anyone else had problems with this?

Example code:

<script language="javascript">
function announce()
{
alert('Hi!');
}
</script>

A simple description of the problem would be that the focus moves from
the page to the alert, and then to the page again after you close the
message box. If you do not change focus from the focus handler, you'll
not have this 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

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top