generalized the javascript posts to use site_url rather than a string literal