yui

Dynamically loading sub-trees into YUI Treeview

When you create a YUI TreeView instance, you can pass in an object that represents an entire tree, and it will automatically build up the TextNodes for you. I'd like to send in a partial tree, such that the tree only goes, say, 2 levels deep, and anything deeper than that will invoke dynamic loading. I've got that much working. Now for ...

What is the correct date format for a Date column in YUI DataTable ?

I have produced a data table. All the columns are sortable. It has a date in one column which I formatted dd/mm/yyyy hh:mm:ss . This is different from the default format as defined in the doco, but I should be able to define my own format for non-american formats. (See below) The DataTable class provides a set of built-in static fu...

YUI config object

I noticed reading the YUI documentation that it says: YUI ( o* ) Parameters: o* Up to five optional configuration objects. This object is stored in YUI.config. See config for the list of supported properties. What would be the reasoning behind limiting it to 5 configuration objects? There are appear to be more than...

How to Implement Web Based Find File Database Via Text Search

I have series of files like this: foo1.txt.gz foo2.txt.gz bar1.txt.gz ..etc.. and a tabular format file that describe those files: foo1 - Explain foo1 foo2 - Explain foo2 bar1 - Explain bar1 ..etc.. What I want to do is to have a website with a simple search bar and allow people to type foo1 or just foo and finally return the gzipp...

YUI Uploader: automatically open browse dialog

I'm using the YUI Uploader component and want to automatically open the browse dialog on page load so the user can choose a file without first clicking the upload button. Is this possible? The uploader component is a Flash movie so I don't think it's possible to trigger a click on the upload button using Javascript. ...

Using cellUpdateEvent with YUI DataTable and JSON DataSource

I'm working with a UI that has a (YUI2) JSON DataSource that's being used to populate a DataTable. What I would like to do is, when a value in the table gets updated, perform a simple animation on the cell whose value changed. Here are some relevant snippets of code: var columns = [ {key: 'foo'}, {key: 'bar'}, {key: 'baz'} ...

Remove YUI Rich Editor Header and make it not collapsible

I am using the YUI Rich Editor (SimpleEditor) which gives an editor that has a heading that says "Text Editing Tools" and a +/- button that shows/hides the editing tools. I don't need this, how can I hide them or disable these features? Thanks! ...

YUI Rich Text Editor Tool to apply Border for Image or div or page?

I have requirement, where a user can choose any border for the content he posted in the editor. Is there any sample available to create borders in YUI Rich Text Editor? Any help is appreciated. Thanks, ...

Why does this window object not have the eval function?

I ran into an interesting (?) problem in the YUI rich edit demo on IE. When looking at the window object for the content editable frame used as the browser I see that the eval function is undefined (by running the following). javascript:alert(document.getElementById("editor_editor").contentWindow.eval) This only happens on IE (I check...

How to make the yuicompressor jar file a singleton, or globally accessible?

I'd like to put the yuicompressor jar file in a single folder so that I can call java -jar yuicompressor-2.4.2.jar ... from anywhere on my system, with cygwin. For bash files I use I simply put them in a common folder, and added the folder's path to my windows user's PATH environment variable and the bash commands were found in cygwin...

YUI CSS Basic Grid Pattern: Get width+margin on right grid (yui-ge) with jQuery

I have this Basic Grid Pattern on my website: <style type='text/css'> #doc3 { margin:auto; } </style> <div id="doc3"> <div id="bd"> <div class="yui-ge"> <div class="yui-u first" id="main"> Main content here </div> <div class="yui-u" id="right_cont"> right content here </div> </div> ...

Can i use microsoft ajax tab controls SKIN only ?

I like YUI's Tab, to use its look and feel for own tab like implementation we just have to include yui tabs CSS and use markups and css classes and done. example below, <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/tabview/assets/skins/sam/tabview.css" /> <ul class="yui-nav"> <li><a href="#tab1"><e...

How to acces a global variable in a callback object in javascript YUI without use window.myvariable ?

I have this : var MyObject = function(){ this.url = "monurl"; this.mavar = ""; this.Load = function(){ var callback = { success: function(o){ mavar = o.responseXML.getElementsByTagName("montag")[0].firstChild.nodeValue; } } YAHOO.util.Connect.asyncRequest('GET',url,callback); } } ...

Fire an event when the innerHTML of a <div> changes. In YUI or otherwise

Is it possible to fire an event when the innerHTML of a changes? I am using YUI 3. Thanks! ...

YUI: ensuring DOM elements and scripts are ready

If I put my inline script after the DOM elements it interacts with, should I still use YUI 3's domready event? I haven't noticed any problems, and it seems like I can count on the browser loading the page sequentially. (I already use YUI().use('node', ... to make sure the YUI functions I need have been loaded since the YUI script is a ...

How to disable a YUI MenuBarItem from markup

I prefer creating my nav menus from markup (rather than Javascript), like in this example. Is it possible to create menus and/or menu items from markup which are disabled? I see how to use Javascript to do this (use the disabled config property), but I'm looking for some way to encode this information in markup - perhaps there's a CSS cl...

YUI Calendar: how does it load the Sam's Skin CSS?

I'm using YUI 2's calendar in YUI 3. How does it load Sam's skin CSS? I didn't manually include it (though it seems like I should so the user can download it in the one request I make to the combo loader for css). Strangely, I don't see it being downloaded nor do I see it in the JS files themselves. I must be overlooking it. This is...

How to lazy load scripts in YUI that accompany ajax html fragments

I have a web app with Tabs for Messages and Contacts (think gmail). Each Tab has a Y.on('click') event listener that retrieves an HTML fragment via Y.io() and renders the fragment via node.setContent(). However, the Contact Tab also requires contact.js to enable an Edit button in the fragment. How do I defer the cost of loading contac...

Is case sensitive ID for IE avoidable if using YUI 2.8 ?

I'm using YAHOO.util.Dom.get in IE. It seems to be case sensitive and YUI (2.8) can't seem to deal with. FF lets you get ID's without case sensitivity issues. I was wondering if there is a way to also do it in IE. This link says there is a problem. But has YUI been able to get around this ? ...

YUI Autocomplete: itemSelectEvent getting lost with IE6 and IE7?

I'm using YUI Autocomplete (latest version loaded using loader as of today (May 14th, 2010), which looks to be 2.8.1, with the following options: ac = new YAHOO.widget.AutoComplete("mynode", "autocomp_node", ac_ds, {typeAhead: true, forceSelection: true}); ac.itemSelectEvent.subscribe( function(type, args) { ...