Solved

Button that sends and gets AJAX message using JQuery

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

820 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