how to use ajax variable in javascript