Question : Javascript Ajax - No Value Changing?

I am having trouble getting another programmer who quit's javascript - ajax thing to work. It use to work, he was making a change in it, and suddenly quit. I got the parts of it to work that update the database.

The thing is, people click a button and depending on that user's score, the counter goes up one or more points. (Kinda like Digg).

Now I have the thing working so that when someone clicks the button, the database is updated, so when the page is refreshed, the new score is shown correctly.

What I am having trouble doing is getting the counter to click immediately after the click with that magic Ajax stuff.

So below I am posting three pieces of code. The Clicky Button, the Ajax Java script that gets called, and the form that is also referenced in the button. The form posts up an Action and the Action prompts some database work - but nothing javascripty.

The actual site is here: http://braynardwebdev.com/index.php
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:
///////
// This is the html/java part of the page with the counter and the ///button. 
////////
0
Thumbs up
Thumbs up /// Ok, this is the ajax_submitform_noreload part. function AJAX_SubmitForm_NoReload(f,div) //{{{2 { var xmlReq = false; try { xmlReq = new XMLHttpRequest(); } catch (trymicrosoft) { try { xmlReq = new ActiveXObject("Msxml2.XMLHTTP"); } catch (othermicrosoft) { try { xmlReq = new ActiveXObject("Microsoft.XMLHTTP"); } catch (failed) { xmlReq = false; } } } if(!xmlReq) { alert("Unsupported Browser. You need to support AJAX for this page to work properly."); return; } var formData = '', elem = ''; for(var s=0; s {$PAGER_HIDDENS}
Open in New Window Select All

Answer : Javascript Ajax - No Value Changing?

>>Yes, that form does get submitted
Don't take this the wrong way but was not asking if there is a form. I know what the script is doing. I have seen this before - when the other person was coding it.
Random Solutions  
 
programming4us programming4us