Solved

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

Posted on 2010-11-17
2
657 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
[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
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 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 82

Expert Comment

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

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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 how to dynamically set the form action using jQuery.

730 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