Fixed the javascript to correctly modify page.