yui

Rich Text (YUI) Editor Broken on IE11

天涯浪子 提交于 2019-12-06 02:33:10
问题 I'm running Internet Explorer 11 and YUI 2: Rich Text Editor seems not working. Please see attached screen shot for more detail. Any ideas how to fix this under IE11? 回答1: For IE changed its User-Agent, YUI(2.9) need a surgery. Modify yahoo-dom-event.js: Find this: YAHOO.env.parseUA, then at last add something that tell YAHOO.env.ua now is undering IE 11. like this: if (g.ie == 0 && c.indexOf('Trident') != -1){ g.ie = 11; } Modify editor.js: Find the _setInitialContent function, and after the

How to get calculated element width and height in YUI3?

一世执手 提交于 2019-12-06 00:43:33
问题 jQuery has handy .height() and .width() utilities to get calculated displayed size of a DOM element. It also has .position() to get coordinates. In YUI3 Node, I see that there are .getX(), .getY() and .getXY() utilities to get position, but I do not see anything for size (or can't look). What's a good way to get element height and width in YUI3? 回答1: getComputedStyle .getComputedStyle("width") .getComputedStyle("height") 来源: https://stackoverflow.com/questions/3039828/how-to-get-calculated

YUI3 selector problem in ie8

跟風遠走 提交于 2019-12-05 20:17:00
Y.one('form fieldset:nth-child(2)').toggleClass('hide'); in chrome, FF, opera this line works but in ie6-8 it throws an error 'Y.one(...)' is null or not an object. where is the problem? Have to add the "selector-css3" module to your .use() statement if you want to use CSS3 selectors in browsers that don't support them natively. 来源: https://stackoverflow.com/questions/3713263/yui3-selector-problem-in-ie8

How to use YAHOO.util.Connect.asyncRequest and return results?

拜拜、爱过 提交于 2019-12-05 17:12:19
I'm using YAHOO.util.Connect.asyncRequest to get data from database, here is the code : function getCountArticle(contentCurValue) { var handleSuccess = function (res) { var countPubmed = YAHOO.lang.JSON.parse(res.responseText); var contentCountPubmed = countPubmed.totalArticleRecords; alert(contentCountPubmed); //return 15 for example }; var handleFailure = function () { alert("Error connecting data : Bad pubmed query"); }; var callback = { success:handleSuccess, failure:handleFailure, timeout: 5000 }; var sURL = 'qct-list-article.html?term=' + contentCurValue + '&retstart=0' + '&retmax=1';

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

大城市里の小女人 提交于 2019-12-05 16:15:14
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 been updated to support even YUI 3.4, while 3.8 is "current") Use roll up combos for speed instead of many

Rounded input boxes with YUI

这一生的挚爱 提交于 2019-12-05 12:38:23
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. There multiple techniques to make cross-browser rounded corners , and YUI can certainly be used to convert input elements on the fly, adding wrapper div s if needed to support the method you choose to use. Here is a YUI 3

Palm Pre frameworks

依然范特西╮ 提交于 2019-12-05 11:44:17
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 mainstream modern JS framework is the most useful to learn if the main criteria is "knowing this will help me

JavaScript idiom: create a function only to invoke it

[亡魂溺海] 提交于 2019-12-05 11:23:58
问题 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. 回答1: They're taking advantage of closures. A short explanation: Since JS uses function-level scoping, you can do a bunch of actions within a function and have it remain in that scope. This is useful for invoking code that doesn't mess with the global namespace. It also

YUI 3 is going to yui.yahooapis.com to get code. I am HTTPS and content blocked

巧了我就是萌 提交于 2019-12-05 08:01:34
I worked this holiday to find out my code wont work on HTTPS. My LOCALDEV is HTTP and our production server is HTTPS. For some reason YUI is going out to get JS, when I have it locally. I have it on the server........... And finally my code: YUI().use('autocomplete', 'autocomplete-filters', 'autocomplete-highlighters', function (Y) { var notes = [ "Dr Follow Up Complete Notes", "Fax Document Notes", "Event Notes", "Email Information Notes", "Corresponding Document Notes", "Return Call Notes", "Admit Notes", "Discharge Notes", "Other Notes", "Excellent Resource Notes", "Good Resource Notes",

How can I refresh a YUI dataTable with a button?

为君一笑 提交于 2019-12-05 04:21:48
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: { fn: onMenuItemSelect } } ]; var oSplitButton5 = new YAHOO.widget.Button({ type: "split", label: