yui

What are the differences between YUI2.7 and YUI2.8?

I have encountered a peculiar problem when I migrated from YUI2.7 to YUI2.8 in one of the application I have developed. I am getting a JSON object from a WebServer and processing that object and creating an array. I am passing that array to a datasource which intern used to create a Datatable. This mechanism is working fine in YUI2.7...

YUI SimpleEditor not right layout

I've downloaded the YUI library for the nice SimpleEditor. When installed and created a simple test. It will not display right. this is how it should look like. http://developer.yahoo.com/yui/examples/editor/simple_editor.html and this is how it looks with my example: http://ms.robertcabri.nl/testing.php Here is the code of my testing...

How to override YUI Panel CLOSE button event?

I have a YAHOO Panel object defined like this: profilesDialog = new YAHOO.widget.Panel("profiles_dialog", { width: "705px", height: "609px", fixedcenter: "contained", close: true, draggable: true, zindex: 2, autofillheight: "body", visible: f...

Detect Image Load Cancelation in Javascript

I'm currently working on a page that loads several images sequentially using setTimeout and onLoad. Basically when an image finishes loading, onLoad is triggered, which starts another image loading via a setTimeout call. Unfortunately, if an image load is interrupted for some reason, such as a subsequent ajax call, onload is never call...

What makes IE6 not accept text in input boxes?

I have 2 input boxes that are not disabled. When either gets focus no cursor is displayed and any text that you type in is not displayed. There are several events attached to these elements, but there are no js errors. Expected behavior occurs in IE7, IE8, FF2, FF3, Chrome, and Safari. EDIT: Here is a code example of the events being at...

How do I capture YUI Mouse events on datatable?

When the the mouse is dragged over few datatable cells, I need to draw an overlay spanning the cells over which the mouse was dragged. How do I do this with YUI? I tried setting a variable on cellMousedownEvent which I can use when cellMouseUpEvent occurs. But the variables I tried to set on cellMousedownEvent are not getting set. ...

Standard way to include javascript library from javascript.

I'd like to pull in the jquery library from my javscript include. Does this work 100% of the time? Is there a better way? (function() { var loadJquery = function (cb) { var addLibs = function () { if (typeof(document.body) == "undefined" || document.body === null) { setTimeout(addLibs, 100); return;...

What http status code is supposed to be used to tell the client the session has timed out?

In a webpage, it uses YUI connection manager/datasource to send AJAX requests to the server, if the session (which contains the info on whether the user has been authenticated) has already timed out, those ajax responses that can only be viewed by authenticated users should return an http status code, telling the client that the session ...

How can we know what parameters are passed into a callback function in YUI?

From http://developer.yahoo.com/yui/docs/YAHOO.util.DataSourceBase.html#method_sendRequest,you can see the oCallback is an object literal with the following properties: success The function to call when the data is ready. failure The function to call upon a response failure condition. The problem is that it does not mention what paramet...

YUI Editor - Image Upload

Is there a plugin to upload images via the Images window, that will work with YUI 2.8.0r4 ? There is one but that only works with 2.3.1 :( Any ideas? ...

YUI.io (ajax) and Django - update works only once, YUI can't find form again

I am using YUI 3.0 io to submit form data with ajax. The form fields are created from a django view (ModelForm). The first time the form loads, I update a field and submit the form using YUI onclick which calls the io callback which runs the django view and returns the ModelForm again with the update data. This works once (saves to datab...

YUI DataTable : How to edit the column headers?

I would like to be able to edit the column headers in the same manner that I can alter row-values. Anyone come up with a way to do this? I don't see any mention of it in the docs. ...

Grails YUI performance

Using the grails YUI plugin I've noticed that my gui tags are replaced with some javascript code that is inserted in the HTML page. Is this behavior contradicts the Yahoo rule of Making JavaScript and CSS External? (http://developer.yahoo.com/performance/rules.html) In other words, how do I separate the script code from the HTML page i...

How to simulate click on (x, y) point of HTML document with Yahoo UI (JS) ?

DOCS http://developer.yahoo.com/yui/3/event/#eventsimulation . but I do not understand how to do it( So how to simulate a mouse down at point ( X, Y) in the client area of some HTML Object with YUI? ...

What is a good yui replacement for jquery.live

jQuery.live Added in jQuery 1.3: Binds a handler to an event (like click) for all current - and future - matched element. Can also bind custom events. http://docs.jquery.com/Events/live Is there a good YUI replacement which can do this? ...

YUI replacements for jQuery.replaceWith and jquery.append

I have some jquery code which I am trying to translate to YUI. I am using YUI 2.8. Using jquery I could have easily replaced a dom element. Is there a good way to use YUI in place of jquery.replaceWith and jquery.append. I tried writing my functions as below, but these can only take text, while I need to pass a rendered dom like. <p><a h...

How to organize OO js code in files? Local network application

I'm currently developing an application that will be run on local network in B2B environment. So I can almost forget about micro(mini?) optimizations in terms of saving bandwidth because Hardware Is Cheap, Programmers Are Expensive. We have a well structured Object oriented js code in the project and obviously lots of js classes. If all...

Dynamically added JavaScript not finding dynamically added fields in IE

Hi, I have a table which has a button to "Add Rows". This button adds a row dynamically with JQuery. It works by copying the first ... and then replacing all the id=".." with an incremented number. The problem is that the rows have a YUI AutoComplete which looks like the following: <td> <input type="hidden" name="location_num[0]" ...

Using YUI in Javascript, How do I draw overlays on datatable/ScrollingDataTable?

I need to draw overlays spanning one or more rows on YUI datatable/scrollingdatable based on the mouse activity ( drag and drop ). I have no issues with drawing overlays on top of datatable. But I want the overlays to be moving along with the rows when I scroll the datatable. As of now after drawing the overlays they remain static ...

How to insert custom html tag using YUI Editor

I've got YUI set up and working. I've created a custom button and it shows up fine. What I would like that button to do is wrap selected text with my own custom 'span' tags, just like clicking the 'bold' button wraps selected text with 'strong' / 'bold' tags. Does anyone have any examples they could point to to make this work? ...