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

Bob Meetin bobm at dottedi.biz
Wed Aug 11 22:31:44 CDT 2010

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.
A little progress, but with the link option it will not respond to 
onClick. See: http://dottedi.biz/code/ajax/test/

<li><a href="#" name="discipline" value="1" onClick="getRating(this.value);">Option 1</a></li>
<li><a href="#" name="discipline" value="2" onClick="getRating(this.value);">Option 2</a></li>
<li><a href="#" name="discipline" value="3" onClick="getRating(this.value);">Option 3</a></li>

Where am I off course?


More information about the thelist mailing list