That took forever...Stupid browser messing up. Anyways the xmlhttprequest works perfectly now. Before it was getting undefined and getting stuck at 1...