yui

YUI Panel Resize issues

I am having trouble while using the YUI panel as a dialog. I have a dialog object created with javascript on page load: $J = jQuery; dialog = new YAHOO.widget.Panel("dialog", { width: "300px", fixedcenter: true, close: true, draggable: true, zindex: 4, modal: true, visible: false }); Then when I call my loadDialog() function from eve...

Yahoo Autocomplete results sometimes show old query

Hi all, I'm using Yahoo Autocomplete with a remote php database request and zero time delay. The problem is that sometimes the results from an old query come back after the most recent query. So far example if im searching for beginner, sometimes the results from 'beg' will override the most recent result in the autocomplete dropdown ...

YUI Test: How to simulate more complicated user actions in JavaScript?

I have a number of tests written with YUI Test. YUI Test capabilities when it comes to simulating users' actions are quite limited, or rather fairly low level. For instance, I can't easily simulate the user typing in a text field, with the events and modifications to DOM objects that go with it. This is something that Selenium does much...

Palm Pre frameworks

I have some measure of web development experience (not my main skill, but I am pretty good with the basics) What I'm sorely lacking is knowledge of and experience with modern JS frameworks (Prototype, jQuery, YUI, whatnot). I'd like to play with them (all eventually but need to start with one). Here's the problem: I'm very interested i...

Prototype and YUI

I saw a reference on a company intranet recently that "You should use YUI instead of prototype". (formerly Prototype was company recommended JS framework). Is that because YUI builds on/extends Prototype? Or merely implements a super-set of its functionality? ...

Not all items sortable with Scriptaculous, Sortables, scroll and overflow

I'd like to have a scrollable container with overflow:scroll in which a sortable list is contained, like so: <div id="container" style="overflow: scroll; width: 200px; height: 100px;"> <ul id="fruit"> <li>Apple</li> <li>Banana</li> <li>Peach</li> <li>Strawberry</li> <li>Cherry</li> <li>Pear</li> <li...

original request for yui-datable and paginator displays 'no records'

I have a simple table that performs a JSON request to get data. Everything worked fine until I got too many records and added a paginator. Now, the initial request returns 52, entries, but my yui-databale displays 'no records', until I change let's say the number of items per page, then it refreshes the widget properly. Here's the code...

how can I select with multiple css selector with YUI3

<ul> <li class="selected cell">test</li> <li class="cell">test2</li> </ul> How can I select only the .selected .cell element? Y.one('.selected, .cell') <= This selects boths li elements. and I just want to select the first element. Is there something like? Y.one('.cell').one('.selected') ??? ...

Why is YUI MenuBar inconsistently displaying in IE?

I have a YUI MenuBar on my site that on rare occasion does not display in IE, I have not been able to repro on other browsers so far. Here is my code: HTML <body class="yui-skin-sam"> <div id="bodyPanel" style="background-color:Transparent;"> <div id="menuPanel"></div> Javascript aItems = [ { text: "Home", url: "/Home" },...

YUI: would it make sense for YAHOO.lang.extend to carry "static" methods to subclasses?

Consider the JavaScript code below, inspired from the YUI documentation on YAHOO.lang.extend. In this code Class1 has a "static method" named factory() (say because it is a kind of object factory). Class2 inherits from Class1 using YAHOO.lang.extend. Why wouldn't factory() be automatically defined in Class2? Is this a reasonable expecta...

YUI Datatable Width

This may seem like a basic question, but I'm having trouble figuring out how to set the table width to 100% on a YUI datatable. I tried doing #dtContainer { width: 100%; } #dtContainer table { width: 100% } but none of these approaches work. To clarify, I am trying to set the datatable width to 100% when the table is empty ...

Background image with a draggable second image (layers maybe)

Hello, I need to be able to take a background image and float a second draggable image (should be scalable, but with fixed proportions) Also the code should be able to 'flatten' the image for photo sharing. Oh, also the floating image should have a dropped shadow to give the illusion of depth. Thanks! Is this possible with jQuery, ajax,...

How do I get html attribute order to be consistent when testing in Javascript.

I have a component that creates a set of text like this in the innerHTML: fourty two<br><br><input value="Select" type="button"> upon setting the innerHTML, the browser will sometimes parse this text, producing: fourty two<br><br><input type="button" value="Select"> This behavior seems browser dependent, because I can get my tests...

jQuery like image swap in YUI

Hi, Im trying to replicate a simple hover effect in YUI just like you would with jQuery however its a little confusing. As in jquery it would go: $('.hoverclass').hover(function() { $(this).addClass('up'); }, function() { $(this).removeClass('up'); }); Any pointers how to do it in YUI? Thanks. ...

YUI modal panel with non-standard background mask value.

I am trying to setup a modal YUI panel above a YUI Tabview. For CSS purposes [1] the tabs have a z-index that goes up to about 20 (depending on how many tabs there are). The problem I am facing is that the mask that YUI draws for the modality of the panel is behind whatever nonzero mask the tabs have, and so the tabs peek through. So ...

Hosting YUI in SSL Site - IE Errors

I'm using YUI on my site. It works fine with no errors when you access over HTTP. However, when IE users access the site over HTTPS they get the dreaded "this page contains secure and nonsecure items" error message, which makes it really close to unusable. I'm hosting the YUI files, so they're getting served up over HTTPS, but in the ...

YUI Browser History Manager (or similar) with multiple IFRAMEs

I've got a page with an iframe that I'm trying to track the history with using the YUI Browser History Manager. I have two IFRAMEs on the page, one for the manager and one which I'm using to navigate. The issue I'm running is to is that after I've navigated the frame a few times and the back button is hit for the first time, the YUI ma...

Replacement for YUI grids in YUI3?

YUI3 deprecated cssgrids, but I don't see a replacement API on the site. How does one layout grids when using YUI3 (in future -- for now, I can use yui2 grids of course)? ...

YUI Text Editor is not working in my Mozilla

I am experiencing this problem for few hours now and really not sure how to solve this. However its work fine in IE but it is not working in mozilla. Here is my code: <!-- Skin CSS file --> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/assets/skins/sam/skin.css"&gt; <!-- Utility Dependenci...

Keeping jquery/javascript separate from asp.net MVC views?

Hi there, I am trying to found it the best way to keep my scripting i.e. jquery/javascript separate from my view (html) in asp.net MVC... Does anyone have any idea the best way of doing this?? I am seeing alot of code smell in my views ... I have used in the past JavascriptMVC which does a really good job and maybe its a good idea ...