Added javascript to render popups and fix double error bug at same char position.