better javascript. page no longer needs a reload