Inline editing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
benslayton
Forum Newbie
Posts: 12
Joined: Tue Jun 06, 2006 3:08 pm

Inline editing

Post 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?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
benslayton
Forum Newbie
Posts: 12
Joined: Tue Jun 06, 2006 3:08 pm

Post by benslayton »

so do u know any code.
tomcupr
Forum Newbie
Posts: 11
Joined: Mon May 08, 2006 2:26 am
Location: Sheffield
Contact:

ajax

Post 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)...
driesdk
Forum Newbie
Posts: 6
Joined: Fri Aug 05, 2005 7:33 pm

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Cookies are not designed to store such information and are not guaranteed in storage capacity beyond a few kilobytes.
driesdk
Forum Newbie
Posts: 6
Joined: Fri Aug 05, 2005 7:33 pm

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Re: ajax

Post 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.
Post Reply