retreiving data from ajax
- $(document).ready(function(){
var htm=null;
$("#search").keyup(function(){
$("#sugg").html("");
var suggestion=$("#search").val();
if(htm!=null){
htm.abort();
htm=null;
}
var searchurl="http://www.nse-india.com/live_market/dynaContent/live_watch/get_quote/ajaxCompanySearch.jsp?search="+suggestion;
htm=$.ajax({
type:'GET',
url:searchurl,
crossDomain:'true',
sucess:function(data){
alert("Here's lots of data, just a string: " +data);
}
});
});
});
HTML CODE
- <form>
<input id="search" name="search" placeholder="Search" autocomplete = "off">
</form>
<b id="click1">click any of these</b>
<div id="sugg">
</div>
I want to suggest stock from nse once user search.
Here the return link contains the information I want but the success function is not trigerring.
Please help