The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

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.