I am writing a Pomodoro (http://pomodorotechnique.com/) style timer and I am trying to figure out why my code isn't working. I am trying to get text from the input but my code keeps going back to my default settings.
my javascript
function task() {
taskReminderText = document.getElementById("form.taskReminder").value;
timeInput = document.getElementById("form.timerLenght").value;
}
my html
<form id="form" onsubmit="checkForm()">
Task Reminder: <input id="taskReminder" type="text" name="taskReminder"><br>
Timer Length is <input id="timerLength" placeholder="20" type="text" name="timerLength"> minutes.<br>
<input type="submit" value="Submit" onsubmit="task()">
</form>