yui

onChange in YUI

做~自己de王妃 提交于 2019-12-22 08:35:42
问题 How we can write code for onChange function in YUI 2 and YUI3. jQuery(':input[type=radio]').change(function(){ var aType=jQuery(this).val(); var numT= aType==1 ? "3" : "6" ; var aWidth=aType==1 ? "330px" : "660px" ; }); 回答1: In YUI 3 Y.all('input[type=radio]').each(function (node) { node.on('change', function () { var val = this.get('value'); ... }); }); // or Y.all('input[type=radio]').on('change', function (e) { var val = e.currentTarget.get('value'); ... }); In YUI 2.9 (which is no longer

YUI AutoComplete events, how to?

醉酒当歌 提交于 2019-12-21 11:05:13
问题 I'm using YUI 3.3.0 and the AutoComplete widget. I'm entirely new to YUI. Here's the thing. I have AutoComplete working. How do I catch an event fired by AutoComplete? The documentation states that a select event is fired when a user selects an item from the list. I want to attach a function to that event. How do I do that? 回答1: Here's an example for the plugin approach, http://tivac.com/yui3/so/skladjfyhafjk_autocomplete.htm Simply pass your event handlers as part of the config when you

YUI AutoComplete events, how to?

安稳与你 提交于 2019-12-21 11:05:11
问题 I'm using YUI 3.3.0 and the AutoComplete widget. I'm entirely new to YUI. Here's the thing. I have AutoComplete working. How do I catch an event fired by AutoComplete? The documentation states that a select event is fired when a user selects an item from the list. I want to attach a function to that event. How do I do that? 回答1: Here's an example for the plugin approach, http://tivac.com/yui3/so/skladjfyhafjk_autocomplete.htm Simply pass your event handlers as part of the config when you

YUI CustomEvent no errors being reported

橙三吉。 提交于 2019-12-21 06:58:01
问题 Does anyone know how to get the below to report a javascript error? (any browser) <head> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"> </script> <script type="text/javascript"> ObjWithEvent = { testEvent: new YAHOO.util.CustomEvent("testEvent") }; ObjSubscriber = { handleTestEvent: function(){ alert('the next line will not show up in the error console'); not_a_valid_function_bro(); } };

How can I test my webpage using different browsers?

巧了我就是萌 提交于 2019-12-21 02:33:08
问题 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 can I test my webpage using different browsers on my machine? 回答1: If you are not particular about testing in your machine, you could try http://browsershots.org

JavaScript frameworks and CSS frameworks: JQuery, YUI, neither, or something else? [closed]

坚强是说给别人听的谎言 提交于 2019-12-20 10:14:08
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I haven't done web development for about 6 years. I'm trying to get back into it and there is a lot of new stuff out there. I've chosen to write my next project with Perl and Catalyst. I keep hearing about various JavaScript and CSS frameworks. I know very little about these

How can I create an empty namespace object without overwriting another object with the same name?

我只是一个虾纸丫 提交于 2019-12-20 04:55:39
问题 I have been studying as much as I can about the Module Pattern suggested by the Yahoo YUI Blog. I've noticed that the YUI offers the ability to create a new empty namespace object without overwriting an existing one of the same name like so: YAHOO.namespace("myProject"); Which can then be called and used with YAHOO.myProject (Reminder: if YAHOO.myProject already exists it is not overwritten) How can I achieve a similar effect using plain javascript, and without using the YUI? Please explain

Best-of-breed JavaScript datatable widget/library [closed]

落花浮王杯 提交于 2019-12-19 08:58:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I've used a couple datatable widgets in the past, including YUI2's, and I'm curious to know if there's a perceived frontrunner out there. I'm excited for jQuery Grid, but I haven't seen anything since it was announced. What I'd like to see in a datatable provider: Can consume JSON arrays of arbitrary objects'

Do javascript variables have a storage limit?

拥有回忆 提交于 2019-12-18 19:08:12
问题 Do javascript variables have a storage capacity limit? I'm designing one YUI datatable where I fetch the data from database and store it in a js object and wherever required I'll extract it and update the YUI datatable. Right now in Dev I've very few records and its storing correctly. In production I may have 1000s of records, this js object is capable to store all these 1000s of records? If its not capable I'll create on hidden textarea in jsp and store the data there 回答1: Yes, objects and

Display JSON/YAML hierarchy as a tree in HTML?

守給你的承諾、 提交于 2019-12-18 13:17:06
问题 I have YAML data that looks sort of like this, but ~150k of it: --- all: foo: 1025 bar: baz: 37628 quux: a: 179 b: 7 ...or the same thing in JSON: {"all":{"bar":{"baz":"37628","quux":{"a":"179","b":"7"}},"foo":"1025"}} I want to present this content in an expandable JavaScripty HTML tree view (examples: 1, 2) to make it easier to explore. How do I do this? I guess what I really want to figure out is how to take this YAML/JSON data, and automatically display it as a tree (with hash keys sorted