Solved

Button that sends and gets AJAX message using JQuery

Posted on 2011-03-22
4
212 Views
Last Modified: 2012-08-13
Hello, I need to create a button that sends a number to a PHP script and gets an answer to present in an alert window. How can I do this using JQuery?

Thanks.
0
Comment
Question by:IvanGarcete
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35192572
0
 

Author Comment

by:IvanGarcete
ID: 35192680
Yeah, that could work partially... How can I get and print a returned parameter  from a PHP function inside the JQuery function?
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 35192838
you need to use the success handler/function
http://api.jquery.com/jQuery.ajax/
0
 

Author Comment

by:IvanGarcete
ID: 35193124
Yeah, but how do I capture the message from my php script? Is that "data"? How do I show data in an alert window?
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

813 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

13 Experts available now in Live!

Get 1:1 Help Now