changed getElementById to document.getElementById
changed some mistakes in appendingresults