Now, we are going to add that at the function to the form, and first thing we need to do is when you
click the pen icon, it should get the eye of this document.
And if you remember, when you click on the icon, you can see that is a habitat pop up from the text
content and then you click on the icon.
It will pop up to test delete.
So we have to back to the item container and check whether the text content is added.
And first, we are going to create the update I.D. so stored ID to this variable where the user click
on Depend Icon.
So now we are going to check if the content is equal to at it, then update it is equal to this attribute.
So now if we.
Cuonzo a lot of the I.B. and now if we take on the icon, you know, this is because we have an ad,
the Entropia at this icon.
So we also need to copy these and pasted to the icon.
Now, if we refresh and click on the button, you can see the idee.
Of each document.
Now, we already got the I.B. so we can go to NICTA, put requests when the user click on the update
button.
Now, we already have the idea of form.
So we can use these and then you start on social media, and then the first thing is we ran the default
action, which was reload a page, and then we let the data is equal to new form data.
And then we passed the exit form to form daytime's interface, provide a way to easily construct a set
of key value pair representing the form fields and also values so we can in order to see the data that
we can type.
Like this.
And then we type at home and then we type Chouf and then update you kind of see these key values pair.
And these things is just for you to look at the data inside, so we do not need to care about this.
Now, after we already have the data, we are going to make a request.
So we are going to use the asinger wait
and then we let the response is DeCota and I wait and fach items.
And then we use the method you put and the header and actually we may copy from this documentation and
I will also put it in the link, and this is how to post the data with a content type in this form so
we can copy these body and headers.
And then we repace this after we get a response, we can let the result is equal to a great response
on.
And after we already update the reality, we can be set to form and also we can refresh the page and
now we can see whether we can update the form first.
So we go back to the Web page and refresh.
Now we go to edit the phone one, we try to correct this to Apple and make a price to one hundred.
And then we take update.
Now you can see it already update the values.
So now what we can do is and in order to let the user note it already update successfully, we can use
alert and we put the we s thought, I say, because if you look at this, you can see our object properties
message.
So we have to put some thought message here.
So now if we refresh the page and if we take on it and then we on this as the phone again and then maybe
form five, the price is five hundred and update update successfully.
And you can see inside the index page already changed the most updated items.