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

quick question
Hi ..

i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a

Help please - How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde

PL/SQL: ORA-00947: not enough values error message
Hi all i am getting Error(25,63): PL/SQL: ORA-00947: not enough values error message when executing

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

php or sql?
Sorry not sure if this is a sql problem or php the following code is supposed to delete data from th

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

MSSQL/PHP
I am tryint to setup a webapplication developed in PHP, Apache2.0 and SQLServer2000 as backend which

Stuck with preg_replace
Hi,

I'm trying to use preg_replace to remove part of the IP address submitted using a form on

Insert numbers from Barcode scanner into online php page
I have a real big problem, Here is what I'm trying to do. I have a Intermec CN3 handheld computer th

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