Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Help with YUI FunctionDataSource

Posted on 2008-10-08
1
Medium Priority
?
538 Views
Last Modified: 2012-05-05
Hi Experts,

What would be the best way to grab data from a database with asp and pass it to a YUI FunctionDataSource ...
http://developer.yahoo.com/yui/datasource/#instantiating

I have tried using AJAX to grab the data from the database and i'm returning it in format required, but the problem is that I don't know how to then pass it to YAHOO.util.DataSource

Any help appreciated
0
Comment
Question by:claracruz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 82

Accepted Solution

by:
hielo earned 1000 total points
ID: 22675885
You need to look at the "Instantiating a DataSource" section of:
http://developer.yahoo.com/yui/datasource/#start

to see which type of data source applies to you. Since you say you are submitting an ajax request, then if the result is in JSON format then you should be able to use:
var dsLocalJSON = new YAHOO.util.LocalDataSource(xmlHttp.responseText);

Another alternative is that instead of making the ajax request yourself, instantiate the datasource with a direct url to the server where you are sending the ajax request. So, on that example, that is the same as:
// DataSource for a server accessed over XHR  
var dsXHR = new YAHOO.util.XHRDataSource("http://local_path_or_path_to_proxy");  
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

660 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