Hi,
I need to send 15 requests to my server and get results, these results are queries to other sites. I then update my page with the results. I need to know if I am taking the correct approach, as things are working a bit slow, and I.E. seems the be as slow as a snail. Here is my function for the first request
i then call this function and others from my page, one(); two(); etcCode:function one() { var xmlHttpa=null; try { xmlHttpa=new XMLHttpRequest(); } catch (e) { try { xmlHttpa=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttpa=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttpa.onreadystatechange=function() { if(xmlHttpa.readyState==4) { document.getElementById('resulta').innerHTML = xmlHttpa.responseText; var el = document.getElementById('showMessagea'); el.parentNode.removeChild(el); applystyle(); } } xmlHttpa.open("GET","one.php",true); xmlHttpa.send(null); }
Am I correct in my approach?




Bookmarks