By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,783 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,783 IT Pros & Developers. It's quick & easy.

how 2 focus on combo box by javascript

P: 1
Plz tell me how to focus on the combo box ( not to particular item) by javascript

the code

document.teacher_inp.select_homeblk.focus(); --- gives error as object doesn't support this property or method
Jan 24 '08 #1
Share this Question
Share on Google+
1 Reply


gits
Expert Mod 5K+
P: 5,353
hi ...

please post more of the related code html/javascript i just tested in IE 6 and FF and it worked:

[HTML]<html>
<body onload="document.getElementsByTagName('select')[0].focus();">
<input type="text">
<select>
<option>test</test>
</select>
</body>
</html>
[/HTML]
kind regards
Jan 24 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.