make the js works with php