257
Views
1
Comments
Solved
Cannot set properties of null (setting 'innerHTML') Facing this error
Question
Application Type
Reactive

I have implemented countdown timer using js

here while timer is 0:00 then container will hide and again I hit this JS with set container visible true that time I facing this issue 

 

2022-12-09 09-54-41
Gaurav Rawat
Solution

Hi Preeti Mahajan,

I think issue in line No 10.

your element "id" is not exists in dom at time.

I think you hide the element using inside if block in widget tree.

try to make use of visible property true/false of element based on the condition.

Not to inject or remove html element using if block in widget tree.




Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.