Uncaught TypeError: Cannot read property 'value' of null
I need your help to find out what went wrong with my previously working script.... I get the
Error in the console log.
Uncaught TypeError: Cannot read property 'value' of null // line 176
Here is the HTML of my form :
and here is the JS :
<input type='text' class='input-small' data-datepicker='datepicker' id='planned_finish_date_".$i."' name='planned_finish_date_".$i."' />
<span class='add-on'><i class='icon-calendar'></i></span>";
I get the Finish Date correctly in the console log but the script is not working because of the mentioned error in line 176... Any suggestion or help will be highly appreciated!
for (var i=1;i<=nr_of_tasks;i++)
var planned_finish_date = encodeURI(document.getElementById('planned_finish_date_'+i).value); // this is the line 176
var FinishDate = planned_finish_date;