Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-28-2005, 03:09 PM   PM User | #1
looka
Regular Coder

 
Join Date: Aug 2004
Posts: 280
Thanks: 0
Thanked 0 Times in 0 Posts
looka is an unknown quantity at this point
focus checking

how can i check which element has focus? or, can i check if a specified element has focus

(element is a named input element in a named form)
looka is offline   Reply With Quote
Old 05-28-2005, 03:46 PM   PM User | #2
vwphillips
Senior Coder

 
Join Date: Mar 2005
Location: Portsmouth UK
Posts: 4,354
Thanks: 3
Thanked 457 Times in 444 Posts
vwphillips is a jewel in the roughvwphillips is a jewel in the roughvwphillips is a jewel in the rough
var last;

function lastfocus(obj){
last=obj;
}

then onfocus="lastfocus(this);"

in the required elements or use the DOM to attach the event
vwphillips is online now   Reply With Quote
Old 05-28-2005, 04:18 PM   PM User | #3
looka
Regular Coder

 
Join Date: Aug 2004
Posts: 280
Thanks: 0
Thanked 0 Times in 0 Posts
looka is an unknown quantity at this point
thank you, but in some cases (i.e. on printing page) i would like to check focus, not the value of called function. (IE is one irreliable browser:/ )

what is DOM?
looka is offline   Reply With Quote
Old 05-28-2005, 07:10 PM   PM User | #4
CrAzY_J
Regular Coder

 
Join Date: May 2005
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
CrAzY_J is an unknown quantity at this point
DOM Intro
CrAzY_J is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:50 PM.


Advertisement
Log in to turn off these ads.