The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 42 more by this user. Created: 01/10/12
Last CDN Push: 06/20/12
Build Tag: gallery-2012.06.20-20-07
Project: YUI 3
License: YUI BSD
YUI Version: 3.5.1
Free for use.
Adds the method, Y.YQL.execute which accepts a string of Javascript code and executes it with YQL.
The first parameter to Y.YQL.execute is a string of Javascript code. This code will be executed by YQL. Any value assigned to the global variable response.object will be returned in the callback function. The remaining parameters are a callback function, a parameters object, and an options object. These parameters are passed on to Y.YQL.
<script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.06.20-20-07'
}).use('gallery-yql-execute', function(Y) {
// Perform a calculation on the server
Y.YQL.execute('var f=function(n){if(n<=1)return 1;return f(n-1)+f(n-2);};response.object=f(21);', function (result) {
alert(result.query.results.result);
});
});
All code on this site is licensed under the BSD License unless stated otherwise.