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) Quote Link to comment 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.