shamsuljewel Posted November 18, 2007 Share Posted November 18, 2007 Hi all I am trying to do this... mouse click $div_id = "running"; <a onClick=\"makeRequest3('invite_success.php','$div_id');\" href='#'>sent invitation</a> in ajax file function makeRequest3(url,div_id) { //document.write(des_div); try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(E) { xmlhttp = false; } } if(!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } xmlhttp.onreadystatechange = populateDIV2(div_id); xmlhttp.open('GET', url, true); xmlhttp.send(null); } function populateDIV2(div_id) { var MyHttpLoading = '<img src="pic/progressbar_long_green.gif" border="0" alt="running" />'; document.write(div_id); if(xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { document.getElementById(div_id).innerHTML = xmlhttp.responseText; } else { alert('There was a problem with the request'); } } else { document.getElementById(div_id).innerHTML = MyHttpLoading; // still working //setTimeout('content',2000); //document.write("ok"); } } but the program doesnot work...only thing I see the progress bar gif(progressbar_long_green.gif) Link to comment https://forums.phpfreaks.com/topic/77806-where-is-the-wrong/ Share on other sites More sharing options...
shamsuljewel Posted November 18, 2007 Author Share Posted November 18, 2007 only thinks I see the progress bar gif... Link to comment https://forums.phpfreaks.com/topic/77806-where-is-the-wrong/#findComment-393806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.