I didn't want to modify someone else's 400 lines of code to do this. So I wrote this short little 30 line script— a relatively trivial task thanks to my new love Prototype (Kudos to Rick for introducing me).
Obviously the page that you would potentially use something like this for will be a tad more robust, but bear with me for the examples.
The HTML is very basic — just some divs with a class named
You will notice that each section starts with a div ID
eip_number and is followed by a div with the ID of
Here is what happens on the window load:
eip_edit_, assigns it to the original div
eip_number, and shows it.
That's it. View the finished example.
Of course, you will probably want to add your own PHP scripts to this to save your data to a database for further use. This script just updates the current page and all edits are lost on refresh.