Search code examples
dynamics-crm-4

How to access web services with ajax on crm 4.0


I get values using http get method in mypage.aspx page.This page's path is under ISV/Web/mypage.aspx.How can I access and get response this asp page from onload()

Using ajax or what ?


Solution

  • You would want to do an AJAX request, somewhere along the lines of

    var xmlhttp = new XMLHttpRequest();
    xmlhttp.open("GET", "http://YOURSERVER/mypage.aspx", false);
    xmlhttp.send();
    
    //do something with the result
    alert(xmlhttp.responseXML.text);
    

    See the XMLHttpRequest Object for more details