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
Solved

jQuery edit in place saving to database

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

840 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