Testing javascript from within php