yui

YUI Editor: How to use CSS to format content of editor window?

I've implemented the YUI Editor and would like to apply a CSS to change the look of the text the user is working on inside the rich text editor. I'm working with the yui_editor plugin for ruby on rails, but that doesn't mean that a generic answer wouldn't be welcome. It's even OK if you could just point me to the correct API section and...

YUI Editor: Getting rid of <html> tags in content.

I implemented the YUI rich text editor and I would like to get rid of the <html>, <body> and DOCTYPE tags as soon as I save the content from the editor. I know I could do this afterwards by parsing the HTML, but there must be a better solution. Right now this is saved when I edit a text in the YUI editor: <!DOCTYPE html PUBLIC "-//W3C/...

How can I refresh a YUI dataTable with a button?

I'm testing the script: http://developer.yahoo.com/yui/examples/datatable/dt_xhrjson.html I would like to add a button to refresh(reset) the data. I would reset all modified data and reload first data. I add this code, so after select (refresh), I have no data: YAHOO.util.Event.onContentReady("splitbuttonsfromjavascript", function...

Does anyone know of a good site for beginning in YUI?

Does anyone know of a good site for beginning in YUI? The developer's manual on Yahoo is too confusing for me. ...

Changing the format of a date in Yahoo UI

I'm using calendar from Yahoo UI as follows: calDate = (calDate.getMonth() + 1) + '/' + calDate.getDate() + '/' + calDate.getFullYear(); This displays a MMDDYYYY format. I want to change this format to YYYY-MM-DD so that I can insert it into a MySQL database. I changed the code to: calDate = calDate.getFullYear() + '-' ...

YUI Panel and scrolling

I have a draggable YUI Panel defined like this new YAHOO.widget.Panel("parameters", { fixedcenter: true, constraintoviewport: true, underlay: "shadow", visible: false, close: true, draggable: tr...

YUI custom events and simutaneous actions

I'm working on a JavaScript application that has to perform two separate checks via AJAX. Depending on the result of each check, behavior differs. The case I'm interested in here is when both checks are successful. I've identified a few ways to do this, and I want to get some feedback from SO about what they think the best approach is...

Best UI Library to use with jQuery

What do you guys recommend for a UI library to use with jQuery. jQuery UI seems to have less widgets compared to other frameworks. I've been playing around lately with the Dojo Toolkit which seems pretty nice so far, and I know that there is always the Yahoo! User Interface, but is there anything else? I also need to consider licensing...

"Please wait ...", "Loading", "Saving", "Generating" Implementations

In the browsers using HTML, Ajax, or YUI (JavaScript in general) what are successful and preferential implementations of the 'please wait we are working on your request'? Additional context is that the Web Application I work on has a few requests that can require significant IO/CPU time (10 - 30 seconds) and has the need to communicate...

Javascript: simulate a click on a link

I have a link that has a listener attached to it (I'm using YUI): YAHOO.util.Event.on(Element, 'click', function(){ /* some functionality */}); I would like to the same functionality to happen in another scenario that doesn't involve a user-click. Ideally I could just simulate "clicking" on the Element and have the functionality autom...

yui, form submission and data table

I'm a Java programmer, but not a JavaScript programmer. I have just discovered YUI, and am trying to get started using it. What I'd like to try and do is have the query form at the top of the page, the user press Submit and the results show up in a YUI DataTable below the query form. Normally, of course, on a HTML form the user presses ...

YUI stopEvent not working

I am trying to prevent JavaScript events from continuing to propagate, using YUI. The following is some minimal HTML and some minimal JavaScript which demonstrates the problem: HTML: <a href="#foo" onClick="fooClickTest()" id="foo">foo</a>&nbsp; <a href="#bar" id="bar">bar</a>&nbsp; JavaScript: function fooClickTest(e) { alert(...

yui or yui3

Is YUI3 ready mature enough? What are its advantages and disadvantes vs YUI ...

YUI TabView.get("tabs") => null: race condition?

Inside my "dom ready" function, I create a TabView on an HTML element and call tabview.getTab(0).blah(). Unfortunately every now and then I get an error that tabView.get("tabs") returned null in my javascript console (firefox). YAHOO.util.Event.onDOMReady(function() { tabview = new YAHOO.widget.TabView("content"); va...

How to make a Split Button Menu Item scroll into view after this item has been selected?

I have used YUI 2.6 for a while. Now, I realized the Split Button of YUI doesn't behave like the standard select html element. After an item is selected, when displaying the list again, it neither highlight or scroll that item into view at all. In the worst case, if I have 200 items, the user has selected the 100th item, when he/she want...

YUI: customizing message browser shows when cancelling window close event

I have a YUI application. Under certain circumstances I want to alert the user before he closes the window. Therefore I capture the window close event and do onWindowClose: function(e) { if (...) { YAHOO.util.Event.preventDefault(e); } } The browser shows a standrd message: "Are you sure you want to navigate ...

JavaScript idiom: create a function only to invoke it.

I am learning YUI and have occasionally seen this idiom: <script> (function x(){ do abcxyz})(); </script> Why do they create a function just to invoke it? Why not just write: <script> do abcxyz </script> For example see here. ...

YUI support of rtl languages

Does YUI support rtl languages? (rtl: right to left, such as hebrew or arabic). If so, how? I want to display a MenuBar where the different menu items start near the right margin and go to the left. ...

YUI: adding event at the top of some event queue after page loading?

How can I put a new event at the top of all attached events linked to an object just after the page load? Pratically I have an accordion using some YUI funcs to activate its behavior, now without modifying the YUI main function I need some new functions used to call AJAX routines. Currently I am trying with Event.getListeners, but I don...

How can I test my webpage using different browsers?

I just found out about the Yahoo UI Reset CSS tool/file and I'm using it on my website. On my machine I have Internet Explorer 7 and Firefox 3.01 and my webpage looks the same on these two browsers. A friend is using Internet Explorer 6 and the page is completely a mess. I have two questions: Am I that poor/stupid in writing CSS? How...