exchanging focus between iframes

  • Thread starter alberto.ramacciotti
  • Start date
A

alberto.ramacciotti

It seems to me that focus between two iframes in HTML page cannot be
exchanged. I need it to control when a user click on a iframe.
Because window object raise only events onfocus and onblur, I supposed
I could to blur focus away from that iframe to make every click on that
iframe to raise the onfocus event on it.
Sample:

<script>
function focushandler() {
alert("new focus on iframe") ;
self.frame2.focus() ; // I also gave a try to: .document.body. or
getElementById()
// self.frame1.blur() ; it could be an alternative. Doesn't work too
to me.
}
</script>
<body>
<iframe TABINDEX="1" name="frame1" onfocus="focushandler();">
<iframe TABINDEX="2" name="frame2">
</body>

any suggestions will be appreciated.
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top