[thelist] AJAX - expose a div with radio buttons, select & submit/save to mysql

Bob Meetin bobm at dottedi.biz
Thu Aug 12 22:38:46 CDT 2010

Having success with the demo, I turtled forward with the live project.  
I successfully got ajax to work and open up and populate the ratings div 
with the items to rate and the radio buttons. I also got it to grab the 
ratings out of the database and check the radio button items in the 
sub-category that are supposed to be rated.  The live creature looks 
very much like the non-working demo page, 
http://dottedi.biz/code/ajax/ajax-expose-div-rating/.  I set up the save 
button like the following.

<input type="button" name="whatever" value="Save" 
onClick="getCloseRating(<?php echo $element; ?>)">

I also set up the ajax.js file to process the request and pass it to the 
.php file which is supposed to save the ratings back to the database.  
This is where I have again stumbled.  Using the element variable it 
successfully creates the rating items for the list, but I'm not sure how 
to get the rating values.  When I do a print_r($_GET) all I get back is 
the $element variable.

Array ( [element] => 3

What is the next clue along this path?


More information about the thelist mailing list