execute inline and external js on a page