Previous Page
Contact Info
Ajax Demo
Client:
Tap Local
Date:
October 20, 2013
Tools:
Notepad++
Job Request
Very simple AJAX demo using JQuery.
Results:
Your Name
Your Age
Submit - button type
Code Below
function post() { var name = $('#name').val(); var age = $('#age').val(); if(!age){ $('#result').html('Please enter your age'); } else { $.post('validate.php',{postname:name,postage:age}, function(data) { if(data==1){ $('#result').html('You are over 18'); } if(data==0){ $('#result').html('You are under 18'); } }); } }
Click to Expand
View My Portfolio