yui

Palm Pre frameworks

 ̄綄美尐妖づ 提交于 2019-12-07 06:19:44
问题 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 in trying out my skills on Palm Pre eventually. To the extent that the main criteria for choosing which JS framework to learn first for me is this: Which

How can I refresh a YUI dataTable with a button?

心已入冬 提交于 2019-12-07 00:06:08
问题 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 () { var onMenuItemSelect = function () { myDataTable.initializeTable(); myDataTable.render(); }; var aSplitButton5Menu = [ { text: "Refresh", value: 1, onclick: {

what is the jQuery outerHeight() equivalent in YUI

独自空忆成欢 提交于 2019-12-06 19:50:41
问题 In jQuery, I can very easily get the current computed height for an element that includes padding, border, and optionally margin by using outerHeight()... // returns height of element + border + padding + margin $('.my-element').outerHeight(true); How would I do this in YUI? I'm currently using version 2.8.1 . Similar to this question, I can always do getComputedStyle() for height, border, padding, and margin, but that is a lot of manual labor which includes parsing the return values and

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

喜你入骨 提交于 2019-12-06 16:25:09
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. So I then stripped down the whole page to a bare minimum but the cancel button is still working like a

Javascript - Which event to use for multiselect change

狂风中的少年 提交于 2019-12-06 15:41:51
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 on the list without changing anything (useless, confusing). Any idea (with YUI), that would use a

How to use find function in YUI3? And how to find meta tag list?

感情迁移 提交于 2019-12-06 15:25:02
问题 Like jQuery we can collect the array of matched DOM element of class 'anything' with the help of 'find' function Can i have same functionality in YUI3? Edit 1: As i have website source code with the help of php 'file_get_content' function and i want to find the list of meta tag by YUI3. Here i used module named 1. io-base : to get the website source code in ajax mode 2. node : to implement functionality over code. May i know how to parse the responseText to get the list of meta tag? 回答1: You

Load jQuery and plugins in YUI

夙愿已清 提交于 2019-12-06 15:19:10
I am trying to load jQuery as a YUI module, without adding it to the global scope. The best I came up with, was to create a global module.exports so that jQuery thinks it is in a common js pattern, and does not create a global jQuery object... // must create global object for jQuery to detect and attach to // otherwise it will create itself in the global scope module = { exports: {} }; YUI({ modules: { 'my-jquery': { fullpath: '//cdnjs.cloudflare.com/ajax/libs/jquery/1.10.1/jquery.min.js', requires: [ 'node'] } }, onProgress: function (e) { switch (e.name) { case 'my-jquery': (function () {

yui input group validation

青春壹個敷衍的年華 提交于 2019-12-06 07:29:49
I've been working on the validation of a form using AlloyUI/Yui, but I have the following problem: I have 3 input fields that are for the date of birth, they are all required so when I click the submit button I get 3 "this field is required" messages that are breaking my layout. Is there a way to make the script show only one message instead of 3? I have a jsfiddle ( http://jsfiddle.net/0yak4z07/9/ ) showing the issue. The code is pasted below too: YUI().use('aui-form-validator', function (Y) { var rules = { _mine_WAR_portlet_dd: { required: true, digits: true, maxLength: 2, range: [1, 31] },

Grails yui-minify-resources and lesscss-resources conflict

和自甴很熟 提交于 2019-12-06 06:58:05
I have my grails application that use lesscss-resources plugin (v 1.3.0.3). I would like to use also the yui-minify-resources plugin (v. 0.1.5). I installed the plugin using: grails install-plugin yui-minify-resources But now when I try to start the application I have an exception: 2012-10-15 12:58:48,901 ERROR org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [resources:1.1.6]: java.lang.NoSuchMethodError: org/mozilla/javascript/Parser.parse(Ljava/io/Reader;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode; org.codehaus

JavaScript YUI3 using global variables?

天大地大妈咪最大 提交于 2019-12-06 03:40:24
I can't work out how to update a global variable from within YUI3. Consider the following code: window.myVariable = 'data-one'; var yuiWrap = YUI().use('node',function(Y) { console.log(window.myVariable); // 'data-one' window.myVariable = 'data-two'; console.log(window.myVariable); // 'data-two' }); console.log(window.myVariable); // 'data-one' Can anyone explain this to me? It's causing me a lot of trouble. Why can window.myVariable be accessed but not properly updated from within a YUI3 block? I think it might have something to do with Closures but I don't understand why Closures should