Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with numeric names

Status
Not open for further replies.

osomiguel

Programmer
Feb 7, 2001
2
SV
i have problems i am using the following code:<html>
<body>
<FORM NAME=&quot;ftest&quot; Method=&quot;Post&quot; Action=&quot; onSubmit=&quot;return test();&quot;>
<script language=&quot;javascript&quot;>

</script>
<input type= &quot;text&quot; name=&quot;8&quot; value=1 size =5>
<INPUT Type = &quot;SUBMIT&quot; Value=&quot;hola&quot;>
</FORM>
</body>
</html>
<script language=&quot;javascript&quot;>
function test() {
var NameText=8
var TextBox1=NameText.toString()
TextBox2=TextBox1.valueOf();
alert(document.ftest.TextBox2.value)
}
</script>
As you can see, name of my text box is a numeric value, that is why a requirement of my database to make other process later on, the point is that i wanna get that value of that text box but i cant, please i am gonna wait for your answer to see an answer.
p.s: text box's name MUST BE be numeric
 
If it is giving problems - can you add an underscore, and then use parseInt later? Failing this you could use the index in the form.elements array. later on could you?

I think I have had this behaviour before with using numbers as names - what error did it give?

BB

&quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer&quot;
 
thanks so much , form.elements works perfectly, you will go to heaven man!!!!!
 
wi-cked! ;) &quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top