ADD dynamic put javascript at the top or bottom