homepage Welcome to WebmasterWorld Guest from 54.204.64.152
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
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
ebynum




msg:1495083
 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:
document.dev_form.submit();

document.dev_form.message.value="";

document.dev_form.message.focus();

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?
Thanks,
Edward

 

papabaer




msg:1495084
 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...]

tedster




msg:1495085
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved