Solved

Button that sends and gets AJAX message using JQuery

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

706 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

19 Experts available now in Live!

Get 1:1 Help Now