|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Javascript form element focus
I have three forms in a single page.On top of the page i have three links to get each of the forms.I want to set focus for the first element of each form,
so if i select first form, the curser should be focussed on to the first textbox of that form, if i select the second form, the curser should be focussed on to the first textbox of that form, if i select third form, the curser should be focussed on to the first textbox of that form How can i do that? |
|
#2
|
||||
|
||||
|
Hi
Try: Code:
document.Form1.Field1.focus(); Obviosuly, change Form1 and Field1 to meaningful names on your page. You could also try: Code:
document.forms[0].[0].focus(); I think this should focus on the first element of the first form (or maybe it's [0][0]?) MK |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Javascript form element focus |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|