Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

post from jquery to php and return value to display on html page

Posted on 2010-11-17
2
Medium Priority
?
689 Views
Last Modified: 2012-05-10
Hello,

I think I know how to post to php (see below), but how do I return a value from my php script to the client in order to display it on the html page?


$.post("deleteImage.php", {imageId:albumId});
0
Comment
Question by:cgray1223
  • 2
2 Comments
 
LVL 83

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 34159831
Check here the syntax : http://api.jquery.com/jQuery.post/

You miss the success function :

$.post("deleteImage.php", {"imageId":albumId},function(data) {
    alert(data); // alert the data for testing purpose
}
);
0
 
LVL 83

Expert Comment

by:leakim971
ID: 34161383
Thanks for the points!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
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.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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
Course of the Month20 days, 15 hours left to enroll

864 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