Retrieve data from server using $.ajax()

Posted on 2013-02-05
Medium Priority
Last Modified: 2013-02-06

From the web server, I have a function return list <string>, and in my html file i use $.ajax() to retrieve this data. How do I specify data:???? in the $.ajax(...) call?

Question by:mtran888
LVL 54

Accepted Solution

Scott Fell,  EE MVE earned 900 total points
ID: 38857720
Assuming the string is the only thing in the html file

<div id="results"></div>
  url: "test.html",
  cache: false
}).done(function( html ) {

Author Closing Comment

ID: 38861391

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The Super Bowl is just days away. Millions of advertising dollars will be spent in just a few hours to drive people to websites around the globe. Optimizing your site in anticipation of a big event like this (and the traffic surges that follow) will…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question