Page 1 of 1
Inline editing
Posted: Fri Jul 28, 2006 1:03 pm
by benslayton
I found this script
http://www.koculu.net/azer/code/js/inline_editing/
- but i need to now how to save it.
- Does anyone know some php I can add to it?
Posted: Sun Jul 30, 2006 12:26 pm
by RobertGonzalez
That's a neat script. To save it your are going to have to post it to the server and have your PHP code handle the processing. The reason it is not saving right now is that the server it is one has not form action or method, so it is just hitting itself and there are no procecessing directives given to the page.
But it is a neat little script.
Posted: Tue Aug 01, 2006 9:02 pm
by benslayton
so do u know any code.
ajax
Posted: Wed Aug 02, 2006 11:52 am
by tomcupr
I'd use prototype AJAX framework for calling remote script and saving. Or you can write it from the ground if you can.
I use scriptaculous for in line editing - see how easy it is
Code: Select all
<script type="text/javascript">
new Ajax.InPlaceEditor('editme1', '/updateprofile.php?edit1');
</script>
and remote script just gets $_POST['value'] and updates appropriate field in DB (from $_GET)...
Posted: Tue Aug 15, 2006 7:35 am
by driesdk
is it maybe possible to do this and retrieve and save the content of the text in cookies? so anyone can update the page for there own everytime they visit the page?
Posted: Tue Aug 15, 2006 8:35 am
by feyd
Cookies are not designed to store such information and are not guaranteed in storage capacity beyond a few kilobytes.
Posted: Tue Aug 15, 2006 8:48 am
by driesdk
ok, thanks for your answer.
Is there any other way, just to store the users small notes, without them having to make an account first, and writing to a database. that will stay upodated for there next visit?
Posted: Tue Aug 15, 2006 8:59 am
by feyd
You could save it to a different table in the database. You could, for example tell them that, if they wish to save it, to give their email address so the server can send them an access key to remember their notes.
Re: ajax
Posted: Tue Aug 15, 2006 9:04 am
by bokehman
tomcupr wrote:I'd use prototype AJAX framework for calling remote script and saving.
AJAX? What for? I'd use a submit button.