Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: focus checking

  1. #1
    Regular Coder
    Join Date
    Aug 2004
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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)

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,518
    Thanks
    3
    Thanked 506 Times in 493 Posts
    var last;

    function lastfocus(obj){
    last=obj;
    }

    then onfocus="lastfocus(this);"

    in the required elements or use the DOM to attach the event

  • #3
    Regular Coder
    Join Date
    Aug 2004
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #4
    Regular Coder
    Join Date
    May 2005
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •