yui

How to access the value of a radio button that is checked using YUI?

穿精又带淫゛_ 提交于 2019-12-08 15:22:38
问题 i have following radio button structure ... <div id="test"> <input name="test1" value="a" type="radio"> <input name="test1" value="b" type="radio"> <input name="test1" value="c" type="radio"> </div> how would i go about retrieving the value of any checked radio button? i have checked the YUI documentation an there is not really any good example. I would also like to know how to get the element by input name in YUI? 回答1: In YUI 3: var value = Y.one("#test input[name=test1]:checked").get("value

Recommended Javascript Image preloader [closed]

…衆ロ難τιáo~ 提交于 2019-12-08 14:50:38
问题 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 6 years ago . There are a couple of tools and several tutorials (even some including links to github) on how to preloading images and other artifacts, like css and scripts. YUI3 preloader seems to be the most reliable one. Is there a better one? Are there any others that are faster (possibly through parallel loading), more

How do I call a basic YUI3 function from within a normal JavaScript function?

▼魔方 西西 提交于 2019-12-08 08:47:27
问题 I'd like to call a simple YUI3 function from within a JavaScript function. Here is some code that does what I want in a very verbose way: function changeContent (message) { YUI().use("node", function(Y) { Y.all('#content-div').setContent(message); }); } Is there a better way to do this? NOTE: I don't want to attach this function to any event, I just want a global changeContent() function available. 回答1: If you want the API to exist outside of the YUI().use(...function (Y) { /* sandbox */ }),

Javascript - Which event to use for multiselect change

蹲街弑〆低调 提交于 2019-12-08 07:59:56
问题 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 "blur" requires the user to click elsewhere in order to loose the focus and send the query (not very usable), plus it would send the query if the user only scrolls

YUI3 button click event is acting like a submit type instead of a button type

一世执手 提交于 2019-12-08 04:48:21
问题 I am using ASP.NET MVC 3 with the Yahoo API version 3 . I am trying to get my YUI3 button to redirect to another page when I click on it, this button is my cancel button. The cancel button is a plain button type, but it is being treated like a submit button. It is not redirecting to the correct page, but acting like a submit button and it kicks off my page validation like what the submit button would do. I thought that it might be with my HTML but I did validate it. It validated 100% correct.

How do I call a basic YUI3 function from within a normal JavaScript function?

♀尐吖头ヾ 提交于 2019-12-08 04:29:29
I'd like to call a simple YUI3 function from within a JavaScript function. Here is some code that does what I want in a very verbose way: function changeContent (message) { YUI().use("node", function(Y) { Y.all('#content-div').setContent(message); }); } Is there a better way to do this? NOTE: I don't want to attach this function to any event, I just want a global changeContent() function available. If you want the API to exist outside of the YUI().use(...function (Y) { /* sandbox */ }), you can capture the returned instance from YUI(). (function () { // to prevent extra global, we wrap in a

What is the “right” way to use YUI3 with HTTPS?

♀尐吖头ヾ 提交于 2019-12-07 11:43:32
问题 I have a lot of experience with YUI2 and I'm getting up to speed on YUI3. The service I'm writing needs HTTPS, but the vanilla YUI experience loads from Yahoo's HTTP-only CDN, which quietly fails in Chrome and loudly fails in modern IE when the browser tries to mix an HTTPS page with HTTP javascript. My goals are to get all of: Site uses HTTPS YUI works in Chrome & IE (so scripts also must be delivered over SSL) Uses a modern version of YUI 3 (this disqualifies YUI PHP Loader which hasn't

Call click event on last clicked row in YUI datatable

隐身守侯 提交于 2019-12-07 09:50:16
问题 I have a YUI datatable and I have a function which is invoked when I click on a row: ... YAHOO.keycoes.myDatatable = myDatatable; ... myDatatable.subscribe("rowClickEvent", oneventclickrow); var oneventclickrow = function( args ) { ... } I'd like to invoke the function subscribed to rowClickEvent on the row which is currently highlighted in the datatable (the row which was clicked for the last time). I've tried to do something like this: YAHOO.keycoes.myDatatable.getSelectedRows()[0]

Rounded input boxes with YUI

廉价感情. 提交于 2019-12-07 08:35:47
问题 Would it be possible to use YUI to change all my input boxes to have rounded corners? I cannot use a background image as the inputs will be variable width and I cannot add divs wrapped around them because some input elements are generated. Also I cannot use border radius or any moz/webkit variation as it needs to appear the same in IE6. Any pointers appreciated, thanks. 回答1: There multiple techniques to make cross-browser rounded corners, and YUI can certainly be used to convert input

How do I execute .jar java program on Windows 7 command line?

耗尽温柔 提交于 2019-12-07 06:27:21
问题 I have been looking things up online and could not find a good answer so far. I want to execute the YUI compressor tool to obfuscate/minify my javascript file. I do have JRE installed. It looks like the file association is fine as you can see here: C:\directory\tempFiles>assoc .jar .jar=jarfile I set up file association using ftype: C:\directory\tempFiles>ftype jarfile jarfile="C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %* The compressor tool is saved as a .jar file and is