Inline updating & showing text fields
I'd like to put something together that will allow for updating using 2 different methods: instant/inline updating and regular old submit button updating.
Currently I have a form that will work both ways. If you click on the content, using AJAX, you can change the text, then hit Enter and it submits only that element to the db. Changing a variable in the page will then disable the inline functionality and insert text fields instead, so that the user clicks the submit button to submit the changes.
I'd much rather have it so that it will work in both ways at the same time.
1. The user can just click on an element and then update just that element.
2. The user clicks an "Edit" button, which disables the inline updating and presents the text fields with a Submit button.
I could accomplish this with some PHP, so that clicking the Edit button refreshes the page, and then $_GET a var. But, I'd much rather have everything happen without reloading/refreshing.
So, basically, I need a way to click an Edit button, disable inline editing, show text fields and enable <form> tags *without* refreshing the page.
Any ideas on how to do this?