Karl Rudd wrote:

Instead of building a new system entirely use what you have already
use "progressive enhancement".

You have "delete" buttons, with specific names that correspond with
the news items. When they're clicked they submit to a specific URL.

What you can do is catch the click and do the submit via AJAX.

I don't recommend to intercept the button's click. A form can still be submitted by hitting enter. Simply intercept the form's submit action.

The form plugin already does an excellent job at this for you and makes it as easy as typing one line:

$('form').ajaxForm();

All the required parameters like url, method etc. are derived from the form, which is how Progressive Enhancement works of course.

More information on the plugin:
http://www.malsup.com/jquery/form/


--Klaus

Reply via email to