Update input.js

Using the value of the input field was giving inconsistent results. It would flip between the page you are going to and the page your on. Changed it to use the calculated current page instead.