Skip to content
Advertisement

Uncaught TypeError: Cannot set property ‘src’ of null javascript

i have little problem when i want to insert image into form, the code work on other form but in this form it not work with Uncaught TypeError: Cannot set property ‘src’ of null
here is my code
javascript :

JavaScript

form :

JavaScript

Advertisement

Answer

Your img tag is inside the select tag so your javascript is not recognizing the element with id ‘img’ and showing and the TypeError.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement