[thelist] AJAX - expose a div with radio buttons, select & submit/save to mysql
Hassan Schroeder
hassan.schroeder at gmail.com
Wed Aug 11 17:52:22 CDT 2010
On Wed, Aug 11, 2010 at 2:05 PM, Bob Meetin <bobm at dottedi.biz> wrote:
> 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)
OK,
> 3) Place a Save button under the radio button
Simple.
> 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.
Nah, just break it down to individual steps. Say for step 4:
1) create a simple HTML form with fields for the info you want to save
2) write the backend code for the form submission (parse and write the
parameters to the DB)
3) test, adjust as necessary
4) write your mootools-based method to gather that form data and
submit via XHR request
5) attach onsubmit event handler to "save" button to invoke that
method and hide the div in question
6) test
and done! Those are all pretty straightforward, the first 3 being what
you'd have to do if there were no such thing as AJAX. Except #2
doesn't need to return a complete page, just status, or a message,
or whatever you want.
--
Hassan Schroeder ------------------------ hassan.schroeder at gmail.com
twitter: @hassan
More information about the thelist
mailing list