• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet seems to steal focus from HTML page

 
Brett Delia
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a HTML page that has an Applet on it. The HTML also has a form with various text boxes. I have a problem, only when using Sun's Plugin, that when the page loads the focus is stolen away from the form's first element. I cannot seem to get past this, we have tried numerous approaches to no avail.
Has anyone else run into this and if so how did you solve it. I really need the form element to have the focus not the Applet.
Thanks
 
Brett Delia
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmmm, no takers yet?
I am still working on this one and will try to remember to post what I find, if anything to help with this.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brett,
If we write onLoad method in javascript that does,
"document.forms[0].elements[0].focus();" then does it work for you?
Also, we have to make sure this 0th element is the first one in the HTML display you know. Because if the first element is some hidden element then it would not work for you...
I guess this becomes java script issue at this point if we are not able to do anything from the applet...
Regards
Maulin
 
Brett Delia
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, we have tried that one already.
It seems to work fine when using the Microsoft VM, however when we use the most recent Sun Plugin the Applet will always steal the focus from the actual document(the page). You actually have to click somewhere on the web page to even get it to respond.
Originally posted by Maulin Vasavada:
Hi Brett,
If we write onLoad method in javascript that does,
"document.forms[0].elements[0].focus();" then does it work for you?
Also, we have to make sure this 0th element is the first one in the HTML display you know. Because if the first element is some hidden element then it would not work for you...
I guess this becomes java script issue at this point if we are not able to do anything from the applet...
Regards
Maulin
 
Brett Delia
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After hours and hours of research, I finally run across an article on Sun's site:
http://developer.java.sun.com/developer/bugParade/bugs/4984794.html

There is a bug in the latest JRE from Sun when using Applets. There doesn't appear to be a workaround for this issue.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic