add call to javascript function