We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,363 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

object undefined instead of string literal

I wrote a piece of code that allows me to pass a numeric primary key for update when looping through a recordset. This works fine, however, I am doing the same routine for one level deeper into the database structure and the primary key is concantenated and the component I need to pass is a single leter. The code that works so well with the number, now dies and gives the 'object undefined' error...I just want it to pass a string literal...
Any help is apprecited. here is the code for the function:

jsProdPayType = "";
jsProdNm = "";

function setProdPayTyp(num){
jsProdPayType = num;

}

here is the function call : this is in a jasp file.

<td><input type="radio" name ="select_record"  onclick="Javascript:setProdPayType(<%=rs_row.elementAt(3)%>);" > </td>

again, this works fine when i am passing a number... but I now need to pass an alpha char as the key ....

1
Contributor
1
Reply
18 Hours
Discussion Span
8 Years Ago
Last Updated
2
Views
beckerc
Newbie Poster
12 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

this is one of those 'need a second set of eyes.... my funtion name is paytype my functioncall is paytyp ...so the do not match, so once i corrected that and put in the single quotes around my variable, everything works fine.

beckerc
Newbie Poster
12 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0530 seconds using 2.63MB