Display data returned from Ajaxservices!!

Posted on 16th Feb 2014 by admin

I have a question about displaying results using ajax. I have part of the code below.
$.ajax({ type: "POST", url: "AJAXServices.asmx/GetTechInfo", data: '{ "fieldName": ' + hoverElement.attr("id"), contentType: "application/json; charset=utf-8", dataType: "json", success: function(results) { $.each(results.d, function() { //var html = results.d[0]; var html = $('.ttTopLeft').append(results.d[0]); $(contentElement).html(html); });

$.ajax({ type: "POST", url: "Service.asmx/GetMethod", data: '{ "field": ' + id, contentType: "application/json; charset=utf-8", dataType: "json", success: function(results) { $.each(results.d, function() { //var html = results.d[0]; var html = $('.ttTopLeft').append(results.d[0]); $('type').html(html); });
Need to display the data in d[0]. It consists of 3 pieces of data - product id, product name, product description. I need to figure out a way to display it (with css and having more control on my end). Please help
Thanks,SA
Filed under: JSON AJAX ASP.NET

Other forums