Ajax in javascript

I have enrolled in Web development training. I am facing problem in completion of last part of the course regarding Ajax in JavaScript. I have tried and checked the code from video many times, still unable to get required output.
I am attaching screenshot of my code. I would like to get support from team.

@sudarshansangle12 basically what error you are facing??

Not getting the output. Even if I give any value and submit it, the neither default text changing nor the image changing after onclick.

Hi @sudarshansangle12,

The first error that I can see in your code is incorrect document function name. It is document.getElementById() but you have used document.getElemenId();

Please update this and run your code again.

Do let me know in case you need any other information.

1 Like

I am currently facing an issue in the ajax last topic.
I have run the code several times and even cross checked with the video and the code seems to be correct but the name does not get update as I type the user number.
please help me…I am attaching a screenshot of the code.

I encountered this problem after i watched and followed the code and steps mentioned in your web development training program of the AJAX code video part under java script. Please help because I am lost.


Replace “first_name” with “name” while assigning the value to the output element.
The data returned by the API does not contain “first_name” hence your element’s value is not getting updated.

1 Like