Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

jQuery edit in place saving to database

Posted on 2007-11-23
3
Medium Priority
?
952 Views
Last Modified: 2010-04-21
How can I pass the id values uniquely for every editable area?
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
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…
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.
Suggested Courses

610 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