...

View Full Version : focus() help



vorl
08-11-2005, 12:17 AM
hi

could ne1 give me a code of which a field will get focussed on when a certain value in a list field is selected?

thanks vorl :thumbsup:

Kor
08-11-2005, 09:31 AM
<form>
<select onchange="this.value=='focused'?this.form.txt.focus():null">
<option selected>- choose -</option>
<option value="foo">foo</option>
<option value="focused">focus the textfield</option>
<option value="fee">fee</option>
</select>
<input name="txt" type="text">
</form>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum