I can't seem to get this working and it's driving me insane. I've made a JSFiddle and am keen for anyone with more knowledge than me to take a look! http://jsfiddle.net/kLQf3/9/
Basically what I am trying to do is get the user to be able to put a figure (comma included) in the first "To" field ie. "60,000" and I want this number to display in the "From" field it incremented by 1 ie. "60,001".
And the same for the input box. I have limited knowledge of JS but I've got the auto update working but the increment keeps giving me NaN errors because the comma is included.
window.onload = function () {
var first = document.getElementById('firstFieldId'),
second = document.getElementById('secondFieldId'),
third = document.getElementById('thirdFieldId'),
fourth = document.getElementById('fourthFieldId');
first.onchange = function () {
second.value = first.value;
third.onchange = function () {
fourth.value = third.value;
};
};
};