Question : AJAX - Using value returned from ASP page in javascript function

I am currently working on an ASP page in which users may add items to a list.  When these items are added, I also add a "-" button which will then allow the user to delete the item in case they have made a mistake.  I am using AJAX to add the item to the database and return the new id of the added item.  However, when I try to create the "-" button using this new id, I'm getting "undefined" for a value.  I'm hoping someone can help me out as I am very new to AJAX and am not entirely comfortable with it yet.
   Below is the code that I currently have in my page.  I have put in comments in the places where I'm getting the correct and incorrect values.  Any and all help will be GREATLY appreciated.

Thank you in advance,
Chris Cote
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:



    Cable Editing Form
    


    
        
        
        
Associated
Change Notices
CN Number
CN00001 
CN66 
 
Open in New Window Select All

Answer : AJAX - Using value returned from ASP page in javascript function

This code is untested, but demonstrates essentially what I was talking about.

Let me know if this works, and how else I can help!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:



    Cable Editing Form
    


    
Associated
Change Notices
CN Number
CN00001
CN66
Open in New Window Select All
Random Solutions  
 
programming4us programming4us