call a php function using ajax with json datatype

To call a php function or page, you can use jquery or javascript. It’s very simple to call a php page or function without refreshing the page. Use $.ajax to call a server context (URL, function or whatever) to invoke a particular ‘action’. Advantages of JSON -Can easily distinguish between single items and collections of size one (using JSON arrays). -Easier to represent a null value -Easily consumed by JavaScript

Read More

what does async true or async false do in jquery ajax

Async true or async false do very important role in jquery ajax call. Async False: Async false prevent other code or events to call before completing the fist one. async false is good to use when the functions or events are dependent to other one, means one event or statement needs the response of another. Example: suppose you are checking the email address existence in database on registration from and then need to submit the…

Read More