Solved

Button that sends and gets AJAX message using JQuery

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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Suggested Courses

617 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