<!DOCTYPE html>
function showCustomer(str)
var xmlhttp;    
if (str=="")
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari

  xmlhttp=new XMLHttpRequest();
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  if (xmlhttp.readyState==4 && xmlhttp.status==200)

<form action=""> 
<select name="customers" onchange="showCustomer(this.value)">
<option value="">Select a customer:</option>
<option value="ALFKI">Alfreds Futterkiste</option>
<option value="NORTS ">North/South</option>
<option value="WOLZA">Wolski Zajazd</option>
<div id="txtHint">Customer info will be listed here...</div>


this is my code but m not getting any output. what is the problem?

The alert is triggering, are you getting a response at all on that ajax? One of the more common problems is making cross-domain ajax calls. Try running your pages from a (i.e. both pages on the same) server (localhost will do) and see if the problem persists. If you want to allow cross-domain requests from the asp side you could read this article.

At least that should give you an idea whether the problem lies with the ajax call or if it's something on that asp page.

There are TOO MANY possible reasons. One is already stated by Traevel (cross-domain call)...

1) You are using PHP script but you are calling on ASP? This part smells fishy.
2) What browser did you use to test this?
3) Do you intend to make a synchroneous ajax call? You set the flag to "true" when you call for open().
4) What was returned by the page you are sending the request to (the .asp)?