passing variable to javascript