nirmalgupta
IS-IT--Management
Hi,
I am facing the problem in accessing the form element from javascript. This is because the names of the elements have "." in between. this is a sample code which gives error.
<HTML><HEAD></HEAD><BODY>
<FORM METHOD=POST ACTION="">
<INPUT TYPE="text" NAME="jrs.somthing$text1">
<input type = button value = click onClick = fun()>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
function fun () {
alert ( "value iin text is : "+ document.forms[0].jrs.somthing$text1.value );
}
</SCRIPT></BODY></HTML>
Is there any other way to access the elements from there name.or any method? id tag does not work with netscape4.5 .
rgds
Nirmal
I am facing the problem in accessing the form element from javascript. This is because the names of the elements have "." in between. this is a sample code which gives error.
<HTML><HEAD></HEAD><BODY>
<FORM METHOD=POST ACTION="">
<INPUT TYPE="text" NAME="jrs.somthing$text1">
<input type = button value = click onClick = fun()>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
function fun () {
alert ( "value iin text is : "+ document.forms[0].jrs.somthing$text1.value );
}
</SCRIPT></BODY></HTML>
Is there any other way to access the elements from there name.or any method? id tag does not work with netscape4.5 .
rgds
Nirmal