It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Need help with NaN error

Need help with NaN error

Postby Scriptbanger on Wed Aug 23, 2006 1:09 am

:oops: Okay, I know this is pretty basic but I just can't seem to recall how to do it. I have a dynamic form that is generating text and number sequences for field names. What I need to do is take the number(s) generated and combine them with the text to form a complete field name. Yes, text and numbers [math] are different so I keep getting NaN errors. How do I get the number characters FROM math TO text?

Here is my code. An example of the output I am seeking is something like 'linkname1', 'linkname2', etc.

Code: Select all
for(i = 0; i < num; i ++){
var linkname = document.linkform.linkname+i.value;
alert(linkname);
}


Any help would be greatly appreciated.
Scriptbanger
 
Posts: 5
Joined: Wed Aug 23, 2006 1:02 am
Location: Lander, Wyoming

Postby Tombo on Wed Oct 11, 2006 3:51 pm

don't add "i.value"

just add "i"
Tombo
 
Posts: 0
Joined: Wed Oct 11, 2006 3:36 pm


Who is online

Users browsing this forum: No registered users and 7 guests