I can't get YUI3 to work on node.
I have installed all dependencies according to this site: http://github.com/yui/nodejs-yui3.
Here is my code:
var jsdom = require("jsdom").jsdom,
window = jsdom("<html><head></head><body>hello world</body></html>").createWindow();
var puts = require("sys").puts;
var YUI = require("yui3").YUI;
v...
I need to retrieve a JSON resource which requires HTTP Basic authentication. Therefore, I need to set a request header for a DataSource.IO object.
I see that the IO utility itself supports a header key in its configuration object. However, since I'm new to YUI, I can't figure out how to set this configuration value through the mediation...
I'm using YUI3 on node.js but I get all these INFO messages.
How do I deactivate them?
...
Here's a tricky one: has anybody seen a YUI dialog/panel implementation with nice OS X style shadows around the dialog, instead of the blocky shadow that is implemented by default with the "underlay" element?
You can see this type of shadow on Amazon.com popup windows. It requires quite a bit of PNGs but looks very nice.
I'm thinking...
I have a DataTable in YUI and I want to have the record ID be from my data instead of yui-rec1 ...
How do I do that?
...
I am trying to insert HTML into the YUI rich text editor. The code works if I use simple HTML snippets, but if I use something more complicated (e.g. try to embed an object), then it fails.
Edit
Fails - only for FF browser
For example - this works:
var html = '<div><b><u>Hello world!</u></b></div>';
myEditor.execCommand('inserthtml'...
Hi,
I have a YUI dialog that submits a form to a Java servlet. The servlet returns html and javascript. I take the response and put it into a div on the page and then eval the javascript that is within the div.
My problem is that I get an error in the firebug console saying "YAHOO is not defined" as soon as the servlet returns.
I do...
How do I set http header for basic authorization using YUI connection manager ?
env: yui 2.8.1
...
I'm trying to render a calendar with certain days highlighted. The code below should do this, but today isn't highlighted the same as the other days. It seems as though some default renderer is overriding my code.
YAHOO.phitbam.calendar.init = function() {
YAHOO.phitbam.calendar.cal1 = new YAHOO.widget.Calendar("cal1","cal...
Hey,
As I've understood the browser will freeze all DOM rendering when it sees a script tag and only continues once it has processed it. When I inserted an external javascript file (typekit) directly in the HTML this seemed to be the case, but now that I'm including it dynamically it causes a repaint of the window. Is it possible fixing...
My requirement is typical. I need a price range dual-handle slider, where based on the current handle value, the tick size (step size) will change, for example if price is less that 1500, the tick size is 50. between 1500 and 15000, the tick size should become 100, between 15000 to 50000 the tick size should become 500, and so on. I have...
I have a medium size legacy php application with almost no javascript integration. I've recently been learning javascript (yes actually learning it) using Douglas Crockfords excellent book and taken YUI as my library of choice. I've tried out a few things and got a few things working but now I want to integrate the various components e...
I am trying this code in Javascript. But its not working....
The postData is json data sent to the server to be saved.
I have checked that JSON data needs to be parsed or stringify... is that the problem..
or I am doing some other silly mistake...
var postData ="_out=json&name=justtryit&def={"layout":[{"id":"sw-156","xy":[168,80]},{"id...
I want to invoke a javascript function, and I don't need a return value. The function is provided by a flash externalinterface, but I don't have access to allowing my domain access...
Can I proxy a javascript invocation? Do I have to send a cloned post, or is it possible to simply call the function?
I know YUI has callSWF, can I use th...
Hi all,
Trying to write better JavaScript, woohoo!
First step for me: YUILoader dependency loader so all of my custom code is available to use at a reliable point in time.
My current environment:
YUI (2.8.1) library path: C:\wamp\www\lib\js\yui\2\build\ (http://localhost/lib/js/yui/2/build/)
All YUI min, debug and raw files located ...
I'd like to use Google's hosted version of YUI (since Yahoo's doesn't support SSL). I'm using YUILoader:
var loader = new YAHOO.util.YUILoader({
require: ["autocomplete"],
onSuccess: function() { ac_ready = true; setup_manager_autocomp() },
combine: true
});
I'm loading yuiloader from Google's CDN:
<script src="https://aj...
How do I get those values? I see the example on the YUI page to do this but using a click event, and then calling the get('winWidth') method on the event target. But how can I get these values without the use of any event? Thanks
...
Hi,
I won't be able to sort the column which has the date format(mm/dd/yyyy HHMMSS) by using YUI YAHOO.widget.DataTable.formatDate
Please help me out on this problem
Regards
...
Is there a syntax for getting the class name by id. The class name is dynamic so I can't use
if(Dom.hasClass('id-name-here', 'class-name-here')
{
Dom.removeClass('id-name-here', 'class-name-here');
Dom.addClass('id-name-here', 'class-name-here');
}
I can get the src attribute using the id by doing this,
Dom.get('id-name-here').sr...
Can you change classes without id when your classes are dynamic and only the parent has an id?
I have something like:
<div id="number_block">
<div class="one science easy left"></div>
<div class="one science easy center"></div>
<div class="one science easy right"></div>
</div>
I only reach this part
var number_block_children =...