Display data returned from Ajaxservices!!


Posted on 16th Feb 2014 07:03 pm 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

No comments posted yet

Your Answer:

Login to answer
93 Like 45 Dislike
Previous forums Next forums
Other forums

XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h

Multi Dimensional Array Append
Hi Guys

I have a function that returns a multidimentional array eg

$result = functio

Send inserts to mysql thru port 80
Hi!

I have an application that must do some inserts in a mysql db. This db is behind a firewa

Strange cookie problem. setcookie dependant on where user was directed from?
Hello,

I have a website that sets a cookie when a user visits the website. The cookie holds a

gettext translates ALWAYS?
I'm using gettext with the new version of XAMPP (5.3.0) on Windows Seven RTM (build 7600)
gettext

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

IS Retail & Manufacturing
Hi

Can IS Retail and Manufacturing activities be done in same instance ie. in same client

Reading waves
Hi,

I am trying to find a way of finding the highs and lows on a graph line, the line points

Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash