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); });
Did you know?Explore Trending and Topic pages for more stories like this.
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

frame help
on the bottom frame is menu.html

Code: <body><form action='link.php' met

foreach result into a single variable
Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest =&

PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hope

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

$_POST variable un-useable
I'm trying to use a $_POST variable in a mysql update statement but i can't use it for some unknown

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

PHP doesn't send my mail
Hi all, I found this and used it to send mail. Simple contact form with some required fields. The va

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

Click counter to ignore traffic from search bots
I have a click counter on my site that...well, counts the number of clicks a link gets on the frontp

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