Hello and welcome to this lecture on air Jacks event.
If you've done javascript or query before then you will know what events are.
Events are easy.
Visit us reaction or activities on a website.
Events can include things like a mouse click a button click and a form submission.
Ajax has an event called the on ready state change event when a request to this server is sent.
We may want to perform certain actions based on the response from the server be on read this date change
event triggers every time the release date changes.
So did read this did property holds this date us off the exim Mail haste TTP requests.
So there are three important properties of the exit mail.
TTP request objects.
So you've got the on ready state change.
You've got it red state.
And then you've got to state us so there are three properties or the three key properties of the SML
Hayes TTP request object are the on ready stage Change event.
They've got the red this date and then this date us be on red is date change event is used to store
in store if function is stores a function or the name of a function to be called or vault automatically
each time the read listed property changes.
So if this date changes it triggers the function and it performs an action.
The red state holds the status of the so mail his TTP request and the values ranges from zero to four.
So when is set to zero.
That means your request has not been immortalise yet.
When is wrong one means this server has made a connection and it has been recognized when it's on.
Three is process in the request.
When this date when the release date is for the request has finished and the response is now ready then
you look in the status.
When this data is 200 That means it's okay but when it's 4 0 4 email the page can not be found.
So when using be on read this date event you need to specify what state.
If it's an error it read this date and also.
If it's or k..
So you're specifying two things you're specifying the real estate.
If the register is 4 and the existing does this 200 swear by you have read this for the status 200.
That means the response is good to go.
So the on ready state start already did change event this event here is Treat get.
Every time the read this date changes.
So disraeli's Stayed holds 5 values 0 to 4 0 1 2 3 4.
So any time value changes.
Be on the date event will perform a function.
So this on this did change event has a function so that function is triggered every time the ready state
changes.
So this read this did.
As for values from zero to four.
So any time change is this unregistered Change event will trigger a function automatically.
So in responding to this registry change thing you need to remember is that the this date holds 5 values
of the state as these values represent this.
Details of this here.
T T P Es SML a dtp request object.
So it determines what state this x x l s t t B request object is.
So when they read this date is and 0.
It means the request has not been initialized yet.
See.
So when the state is of them in the server has established a connection when the request he registered
is to the request.
That means your request has been received.
When the red state is 3 that means the request is being processed.
When they read this date it is for them is the request is finished and the response is ready all is
done and then you look at the status statuses and read them.
Is it's okay and it's good to go.
If you have in this state or 4 0 reform mermin the page could not be found.
So in the order of the already state change event you need to specify what will happen when the server
response is ready to be processed.
So for example you can see when the red state is 4 and the state is 208.
The response is ready.
Thank you so much for your time in this lecture.
We looked had the horn ready state change event which is a Doubt's reef event and it has an radius date
of 0 tool for an East date change triggers an action from the already state change event when this data
is to uncorrect immense is good to go.
Everything's okay.
Thank you so much for your time.
Bye for now.