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

Bob Meetin bobm at dottedi.biz
Wed Aug 11 16:05:46 CDT 2010


See a sample mock up at: 
http://dottedi.biz/code/ajax/ajax-expose-div-rating/

The request goes something like this:

Ratings get saved in a MySQL database.  The page will look something like:

Category 1
  Level 1(displays summary of ratings under level 1, say 75%)
  Level 2 (ditto "")
  Level 3 ("")
Category 2
  Level 1(displays summary of ratings under level 1)
  Level 2 (ditto "")
  Level 3 ("")
Category 3 - etc...

All levels include sub elements that are ratable, so envision:

Category 1
  Level 1
    Element 1 (with 5 radio buttons)
    Element 2 (with 5 radio buttons)
    Element 3 ("")
    Element 4 ("")
  Level 2 (ditto "")
  Level 3 ("")

However, when you first access the page, you will only get Category and 
Levels, you won't get/see Elements until you do something like click on 
a Level.  Using Mootools accordion effects it is possible to do 
something like this and have all elements hidden until you click on the 
Level, but this means that all the elements under many levels need to be 
loaded when the page is first access and that slows down the page, 
especially when doing a submit, particularly with IE.

The need is for an ajax type dynamic function that when you click on a 
level, say Level 1 text, it will:

1) Create/Expose an Element div/container
2) Run a query and dynamically populate the Element list with Radio 
buttons prepopulated from the database (think I have this)
3) Place a Save button under the radio button
4) When you click Save it will close the exposed area and save to the 
MySQL table
5) Hopefully, under the Level Global rating

This is a tall order.  I have looked through lots of AJAX examples but 
haven't yet found one that operates like this and is set to pass the 
changes back to the MySQL table. 

Thx,

Bob Meetin



More information about the thelist mailing list