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

jquery and ajax

pradeepjain
100+
P: 563
hii guys,
I am newbie to jquery and ajax .

I am stuck to know when to use jquery and ajax . which is better to use and fast .
can anyone plz explain .
Oct 5 '09 #1
Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
jquery and AJAX are two very different things. jquery is a javascript library, while AJAX (Asyncronous Javascript and XML) is a programming pattern (itís about doing a server request). thus you can do AJAX with the help of jquery (but not vice versa).
Oct 5 '09 #2

pradeepjain
100+
P: 563
i am bit confused ..

i do it this way using jquery to get the result from server with out refresh of page like
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3.     $("#mobile_brand").change(function() {
  4.                 $.post("mobile_change.php",{ brand:$("#mobile_brand").val(),price:$("#property4").val(),type:$("#property3").val(),os:$("#property6").val() } ,function(data){
  5.  $("#change").html(data);
  6. });
  7.     });
  8. </script>

so whats will be the difference if i do it in ajax!
Nov 17 '09 #3

Dormilich
Expert Mod 5K+
P: 8,639
@pradeepjain
donít confuse a technique (or pattern) with a library. to answer the question, what you do there is ajax, with the help of jquery.
Nov 17 '09 #4

Post your reply

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