jQuery simple AJAX call (XML as output)

<script type="text/javascript">    function AddTag()    {           $('#<%= btnAddTag.ClientID %>').text('loading...');        $.ajax({                 url: "/webService/Content.asmx/SuggestKeywordsForTopicContent",                 //type: "POST",                 dataType: "xml",                data: {                        content: $('#<%= DetailsTextBox.ClientID %>').val(),                        recordCount: 20                },                success: function(xmlResponse)                {                     $('#<%= btnAddTag.ClientID %>').text('Add Tag');                    $(xmlResponse).find('Text').each(function(){                        var arrayVal =     $(this).text();                        alert(arrayVal);                    });                }              });    }</script>

Leave a Reply

Your email address will not be published. Required fields are marked *