01.
<script language=
"JavaScript"
>
02.
function
doCallAjax() {
03.
$(
'#mySpan'
).html(
'Please wait'
);
04.
$.ajax({
05.
type:
'POST'
,
06.
url:
'LoginForm2.php'
,
07.
data: $(
'#frmMain'
).serialize(),
08.
success:
function
(data){
09.
$(
'#mySpan'
).html( data );
10.
if
( data ==
'OK'
) window.location =
'main.php'
;
11.
},
12.
error:
function
(data){ $(
'#mySpan'
).html(
'Error'
); }
13.
});
14.
}
15.
</script>