Hi guys,
I need your help to find out what went wrong with my previously working script.... I get the
Uncaught TypeError: Cannot read property 'value' of null // line 176
Error in the console log.
Here is the HTML of my form :
PHP Code:
echo "
<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>"

and here is the JS :
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;
  console.log (FinishDate);
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!