Solved

Button that sends and gets AJAX message using JQuery

Posted on 2011-03-22
4
211 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JavaScript waiting 14 69
Basic JavaScript Question 3 38
JavaScript export function not working in IE 15 36
How can i get the length? 7 7
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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…

910 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

23 Experts available now in Live!

Get 1:1 Help Now