Capturing javascript tag object