jQuery :: How to get Ajax readyStates?
Hi all,
I have some problems with getting jquery $.ajax(); readyStates value.
I used this:
- var xhr, jqXHR;
- xhr = $.ajax({
- url: ajaxurl,
- cache: false,
- beforeSend: function(jqXHR){
- jqXHR.onreadystatechange=stateChanged();
- },
- success: function(html){
- //some codes..
- }
- });
- function stateChanged()
- {
- alert(xhr);
- alert(xhr.ReadyState);
- alert( jqXHR.ReadyState);
- }
stateChanged function always return undefined.
Can Anybody help me?
Thank you
Bahram0110