Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  6] [ 4]  / answers: 1 / hits: 26974  / 13 Years ago, fri, february 3, 2012, 12:00:00

I have the following HTML:



<input type=text id=endDateEditBox value= style=margin-left:5px; height:18px; width:70px; vertical-align:middle; onchange=validateDate('endDateEditBox', $(dateFormatErrorString).value)>


And I am trying to make this focus using the following Javascript:



document.getElementById(endDateEditBox).focus();


Which chrome console and Firebug both return as undefined. I feel like I am missing something very obvious here, can anyone help?


More From » html

 Answers
48

The focus() method does not return a value. It sets the focus on the matched input, and then returns undefined...


[#87661] Wednesday, February 1, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
felixa

Total Points: 180
Total Questions: 113
Total Answers: 108

Location: Palau
Member since Sat, Aug 21, 2021
3 Years ago
;