fix some bugs; added viewOutputData, nerTempl; function ajax