faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 5 people (60%) answered Yes
Recently 3 of 5 people (60%) answered Yes

Entry

I want a function that I call to set the focus/cursor in a textfield or list box.

Apr 8th, 2008 18:14
ha mo, Matt Chatterley, Derek Ziola,


You can use the 'focus' method, which exists on most controls:
document.getElementById('idOfTextfield').focus();
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com