use urlgen
load js at the end of the page