adding javascript into html wrapper