Solved

jQuery edit in place saving to database

Posted on 2007-11-23
3
934 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Print Rhino Java Array in Javascript 1 37
Hide and Unhide Table 6 26
REST call Failing 1 12
&& operators not performing required logic 8 16
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

749 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