Solved

jQuery edit in place saving to database

Posted on 2007-11-23
3
922 Views
Last Modified: 2010-04-21
How can I pass the id values uniquely for every editable area?
0
Comment
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 20341913
Use a naming convention on every element similar to the following:
<p class="name" id="fieldName_value"></p>

Then on the server you split the id attribute to extract the fieldname and its value. You need to repeat this for the other fields.
By default, you can retrieve the element id via:
$data = $_POST['element_id'];

unless you specified a different value via the options as in:
$(".editme1").editInPlace({
    url: "save.asp",
    element_id:"ID"
    params: "ajax=yes"
  });

In which case you would use:
$data = $_POST['ID'];
0
 
LVL 1

Author Comment

by:catonthecouchproductions
ID: 20341914
hielo
>> Thanks for the help! I plugged that last bit of code in and worked great!

Thanks again,

Ryan!
0
 
LVL 1

Author Closing Comment

by:catonthecouchproductions
ID: 31410754
Quick!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question