yui

YUI onDragDrop multiple listeners

Hi Folks, I was wondering if anyone was aware of an example that shows multiple listeners to the YUI DDProxy, DD, or DDTarget onDragDrop event. Currently I have a hacked up example going. I'm using the http://developer.yahoo.com/yui/examples/datatable/dt_ddrows.html'>DataTable Reorder Rows example. I've modified it into several js class...

Making YUI TreeView only expand/collapse using the + / - icons

Hello, The problem I am having is that the default YUI TreeView behavior of expanding/collapsing nodes when a user clicks on them is getting in the way of some custom UI functionality I am implementing. I have been able to reduce this to some degree by subscribing to the "clickEvent" and returning false; however the problem still prese...

Error on YUI Anim sample

I'm getting an error when trying to emulate an YUI Anim sample: <script src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js"&gt;&lt;/script&gt; <script> YUI().use('anim-base', function(Y){ var anim = new Y.Anim({ node: '.notice', to: {height: 300}, easing: Y.Easing.backIn }); onClic...

Yahoo UI the popup implementation with YAHOO.widget.Dialog

I used the Yahoo.widget.dialog to implement a popup window. Currently, it popups only on the page which is belongs. If I am working on the other (tab browser) pages. The popup window will be not seen.Could somebody supply some help for this ?Thanks ...

Make table rows sortable with YUI

Currently I have a table similar to below: <table id="tbl"> <thead> <tr><th>Example Title</th><th>Title2</th></tr> </thead> <tbody id="tblbdy"> <tr><td>data1</td><td>data2</td></tr> </tbody> </table> I am using script.aculo.us currently with the code: Sortable.create('tblbdy', {tag: 'tr', ghosting: fa...

background color disapears when i declare a doctype with YUI reset.css

When running in quirks mode, this works as expected however when I declare HTML 4.01 strict the background color disapears. If I remove the YUI reset.css, it seems to work as it should. Anyone know what YUI is doing? I am using body{ background-color:#000; } .wrap{ width:60em; min-height:100%; position:absol...

(YUI uploader) listeners not fiering events

I'm trying to use YUI uploader, but I'm not able to open the file dialog window when I click the browse button. I'm following (more or less) the example on Yahoos demo. Here is my HTML code: <div id="fileProgress"> <input id="fileName" type="text" size="40" /> <input id="uploaderUI" name="uploaderUI" class="submitButton" type="butt...

Not able to run upload.php using YUI Uploader

I'm trying to get YUI uploader work on my computer / localhost, by using this example . The javascript the page use, can be view here. The upload button has the following handler: YUE.on('upload', 'click', this.upload, null, this); (...) upload : function(e) { YUD.get('browse').style.display = 'none'; this.uploader.disable(...

How do you make a draggable <tr> using YUI3?

Hi! I'm using YUI3 and I've been trying to make <tr> tags inside a table draggable with no luck. I've found that I can drag <div> nodes around, but for some reason I can't drag a <tr>. It shouldn't be a limitation, I've found examples of YUI2 where this is done, but the code is completely different from YUI3 and I can't figure this out....

YUI Calendar: get current page / pageChangedEvent

I am working on an application which works with GPS data. Part of the application is a calendar which displays dates for which data is available for a particular device. We then use the YUI Calendar to display this visually. The call to our server looks something like this: http://example.com/listgpsdates?device%5Fid=xx&amp;year=2009&a...

Catch Javascript syntax errors while using YUI3

I'm using slightly modified sample code provided by the YUI team. When my source responds with something other than JSON (or just has a JSON syntax error) my browser (Safari) aborts script processing, preventing me from notifying the user there was a problem. I'm definitely no JS guru, so this code may be a lot uglier than it has to be....

YUI datatable XHR get not using UTF8

OK, so my datasource is serving json and it's UTF8 encoded. Viewing the json result in the browser or Firebug confirms this. But when the YUI datatable displays the results in a table the UTF encoding is lost, resulting in G�teborg instead of Göteborg I see according to the documentation provided by Yahoo that you can specify the conn...

YUI "Get" utility to parse JSON response?

The documentation page for the YUI "Get" utility says: Get Utility is ideal for loading your own scripts or CSS progressively (lazy-loading) or for retrieving cross-domain JSON data from sources in which you have total trust. ...but doesn't have any actual examples for how to do so. Their one example doesn't actually reque...

Javascript - Which event to use for multiselect change

I'm using YUI as javascript framework, and can successfully react when the user changes the value of basic input fields, the reaction being to sent an Ajax query. However, I'm not so lucky with multiselect dropdown lists: listening to "change" would send my query each time the user adds/removes an item to his selection listening to "b...

YUI3 calling a function

top.on('click', function(){ anim.run(); }); I have an anim function, and was wondering why I can't call it like this top.on('click', anim.run); ...

How can I authenticate the user within Json controller action?

I have a .NET MVC controller action that returns a JsonResult to a YUI AsyncRequest callback. All is working fine with the AsyncRequest call and the "Content" model data is successfully updated. How can I now assure that the user is logged before the AsyncRequest is made? Normally I would use the [Authorize] attribute which returns an e...

Iframe hiding/loading makes it invisible in IE6 (yui library)

I don't know if this is just IE IFrame bug or it is something related to yui, I think that it happens when you load something into IE6 iframe while it is invisible (it needs to be hidden) - the content becomes invisible, even though it takes space. Here is the example To see the problem just load the page in IE6, click "New Tab" button...

Javascript race condition question

EDIT: I figured out the answer to the original YUI3 question I posted here, but it led to another one and instead of starting a new thread I thought I'd just add it here. Please scroll down for the new question (it's bolded). Original question: I'm having some issues creating a JavaScript countdown timer inside a YUI definition, my gues...

add custom function to YUI tabview

I've come up with the following function to fill a need: function getTabFromElementID(elementID){ //get all of the tabs from the tabViewObject var tabArray = this.get('tabs'); var foundTabObject = nil; tabArray.each(function(tabObject, index){ if(tabObject.get('element').id == elementID){ foundTabObject = tabObject ...

What's the best way to call a function in YUI3 only if a series o XHR (IO) requests are successful?

I guess this question isn't only specific to YUI, but that's the JS library I'm using and a specific answer would be helpful. Basically when loading a page, I want a script to run a few XHRs using Y.io, and if they all return the data successfully then I want the script to move on to the next step, which will manipulate the data receive...