By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,611 Members | 1,642 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,611 IT Pros & Developers. It's quick & easy.

How to use ajax with jquery to send data to servlets?

P: 1
Hello, How can I use jquery's post method to send a variable to my servlet, I am using a java web application, so far I have something like this

Expand|Select|Wrap|Line Numbers
  1.  $(document).ready(function() {
  2.                     $.post("updateStage", Stage, function(data) {
  3.                         alert("stage loaded perfectly" + data);
  4.                     });
  5.  
  6.                 });
  7.  
where updateStage is the servlet which I want to send data to, and stage is the string (peice of data I want to send)
Nov 21 '10 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
Is it Stage or stage?

What's the value of the variable? Perhaps a map will be better - see examples.
Nov 28 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.