this is an sample ajax request:
קוד:
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
<script>
$("div#validate_information").click( function() {
username = $("div#username");
password = $("div#password");
$.get("a.php", { user: username.text(), pass: password.text() }, function(returnedValue){
class = "ohboy";
if (returnedValue == "okay")
class = "okay";
username.addClass(class);
password.addClass(class);
});
});
</script>
i really don't know why i wrote it in JQUERY but im not going to rewrite it (;
btw
i would use JSON to serialize the variables i want to send in this stream