Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Need help with NaN error



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
Scriptbanger



Joined: 23 Aug 2006
Posts: 5
Location: Boise, Idaho

PostPosted: Wed Aug 23, 2006 2:09 am    Post subject: Need help with NaN error Reply with quote

Embarassed 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:

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


Any help would be greatly appreciated.
Back to top
View user's profile Send private message
Tombo



Joined: 11 Oct 2006
Posts: 1

PostPosted: Wed Oct 11, 2006 4:51 pm    Post subject: Re: Need help with NaN error Reply with quote

don't add "i.value"

just add "i"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap