Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Javascript focus question



7:16 pm on May 20, 2003 (gmt 0)

10+ Year Member

How can I check if a field is 'allowed' to accept focus?

disabled , hidden, or invisible fields can't...Is there an easy way to check?


7:20 pm on May 20, 2003 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

for disabled

if (document.formname.element.disabled == true)

you can change the values of hidden or invisible elements in the script but I don't quite understand why you would need to test for that.


8:33 pm on May 20, 2003 (gmt 0)

10+ Year Member

The lazy route :)

try {
} catch(e) {
alert("can't focus because of\n\n" + e)


Featured Threads

Hot Threads This Week

Hot Threads This Month