Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
function show_packet(str, company)
{
var cam=document.getElementById("company");
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  var xmlhttp=new XMLHttpRequest();

  }
else
  {// code for IE6, IE5
  var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }

    xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {

    document.getElementById("packet_1").innerHTML=xmlhttp.responseText;
    document.getElementById("icon_1").innerHTML="";
    }
  }

xmlhttp.open("GET","show_packet.php?car_moto="+encodeURIComponent(str,true)+"&cam="+encodeURIComponent(cam.value,true));
xmlhttp.send();

}
Posted
Updated 28-Aug-13 8:42am
v2
Comments
enhzflep 28-Aug-13 15:56pm    
This is just plain rude! All you've done is state a problem and dump some code.

1) Use your browsers' debugger (Ctrl Shift I, or F12)
2) Ask a question. One could reasonably construe this 'question' in its current form as "fix this for me"

1 solution

Remember: 1) ActiveX in a browser is evil; unsafe practice; 2) it's only for Windows; 3) even on Windows, browsers don't have to support it; so you cannot assume it will work, otherwise, forget about non-Microsoft browsers.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900