|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
NaN & concatenate???
I'm printing a table to the screen with x number of rows. As each row is put out, I update form objects by appending the value of x to them. For example (rough):
x=1 do while.... <input type=text name="Test & <%=x%>"> x = x+1 next When I click on a form object, I call a function in which I pass the value of x. I then want concatenate x with the name of the form object. For example: function testMe(x) var s = (document.form.Test+x) But each time I get NaN as the form object. What am I doing wrong? Thanks! |
|
#2
|
||||
|
||||
|
NaN
the variable x is being cast as a string.
put some of these in your script to find out where it's changing type: Code:
alert("x is: " + x);
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > NaN & concatenate??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|