Solved

jQuery edit in place saving to database

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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)

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now