javascript posting to index page