K
kirku
hello,
i'm not very good with english
i will explain my problem wit an exemple:
// i have a form called dati
var nome_var="email"; //for exemple
ex1=document.dati.elements[nome_var].value //it's ok, work right
document.dati.email.focus( ) //it's ok, work
right
document.dati.elements['email'].focus( ) //it's ok, work right
//but i need something like this:
document.dati.elements[nome_var].focus //IT IS NOT OK
how can i get focus to "emial" element of form dati, using a variable unitl
the 'name'.
thank you for help.
i'm not very good with english
i will explain my problem wit an exemple:
// i have a form called dati
var nome_var="email"; //for exemple
ex1=document.dati.elements[nome_var].value //it's ok, work right
document.dati.email.focus( ) //it's ok, work
right
document.dati.elements['email'].focus( ) //it's ok, work right
//but i need something like this:
document.dati.elements[nome_var].focus //IT IS NOT OK
how can i get focus to "emial" element of form dati, using a variable unitl
the 'name'.
thank you for help.