homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

JavaScript focus() problem in Opera
textbox loses focus immediately after gaining it

10+ Year Member

Msg#: 119 posted 2:00 am on May 23, 2002 (gmt 0)

I have a JS function that submits the content of a textbox, then clears it, and then attempts to put the cursor back in the textbox. The contents of the function are as follows:



The entire function works fine in IE, but in Opera, the submit and clear work, but the focus has a problem. It seems that it focuses, but then "loses focus." (i.e. you see the mouse cursor appear in the textbox, but then it disappears).
Any ideas?



WebmasterWorld Senior Member 10+ Year Member

Msg#: 119 posted 3:26 am on May 23, 2002 (gmt 0)

Hello ebynum,

Welcome to WebmasterWorld!

There have been some recent threads regarding Opera and javascript. There are limitations present.

focus() does not appear to be supported for use in a FORM.

Here is a link to Opera's .js tech specs: [opera.com...]


WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 119 posted 3:29 am on May 23, 2002 (gmt 0)

Welcome to the forums, ebynum.

I've run into occasional focus problems with Opera as well - and I haven't found a fix. I usually need to re-think my approach if I really need Opera support.

An interesting page here: The W3C Implementation Review of Opera 6 [w3.org].

The W3C rates Opera a "C" for complete in focus and selection conventions. However, as we've seen, there are quirks.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved