yui

javascript: How Can a parent window know that its child window closed?

依然范特西╮ 提交于 2019-12-18 07:42:28
问题 I want to execute a function when an opened child window is closed. Child window opening code is: outWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=600, height=400, top=100, left=100); i want to call a javascript function written in parent window.I am using YUI-2 for developing the plugin. How can i make it work? what event should be registered? thanks in advance. 回答1: You could do

How do I activate a YUI Datepicker only by a seperate Icon, not by the referenced input field?

六月ゝ 毕业季﹏ 提交于 2019-12-18 07:19:54
问题 I want to display a AUI / YUI DatePicker (Tutorial) that only gets activated by a click on a corresponding icon, not on focus or click events as normal. var AUI = YUI; AUI().use('event', 'aui-datepicker', function(A) { function createCalendar(calendarInputBox) { var datumInputField = calendarInputBox.one('input.calendar'); var datumInputFieldSelector = '#' + datumInputField.get('id').replace(/:/g, '\\:'); var datepickerIcon = calendarInputBox.one('.calendarInputIcon'); var datepicker = new A

Loading scripts dynamically

别说谁变了你拦得住时间么 提交于 2019-12-17 19:17:10
问题 I'm loading a few YUI scripts dynamically in my code in response to an Ajax request. The DOM and the page is fully loaded when the request is made - it's a response for an user event. I add the tag to head, as children. But I stumbled in a few problems: I add two YUI scripts hosted at the Yahoo! CDN and an inlined script of my own responsible for creating object, adding event listeners and rendering the YUI widgets. But I when my script run the YUI scripts are not loaded yet giving me errors

Can I put an ASP.Net session ID in a hidden form field?

旧时模样 提交于 2019-12-17 16:10:36
问题 I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net website to allow users to upload files. For those unfamiliar, the uploader works by using a Flash applet to give me more control over the FileOpen dialog. I can specify a filter for file types, allow multiple files to be selected, etc. It's great, but it has the following documented limitation: Because of a known Flash bug, the Uploader running in Firefox in Windows does not send the correct cookies with the upload;

jQuery equivalent of YUI StyleSheet Utility?

北慕城南 提交于 2019-12-17 09:47:07
问题 Does jQuery - or one of it's plugins - have equivalent functionality to the YUI StyleSheet Utility? "The StyleSheet Utility is capable of creating new stylesheets from scratch as well as modifying the existing stylesheets held as properties of elements sourced from the same domain or any inline elements." This (I'm fairly sure) is creating and modifying CSS stylesheets themselves not looping through the DOM and changing element's style property (as the jQuery.css() method does). I think this

How to get child element by class name?

隐身守侯 提交于 2019-12-17 08:53:48
问题 I'm trying to get the child span that has a class = 4. Here is an example element: <div id="test"> <span class="one"></span> <span class="two"></span> <span class="three"></span> <span class="four"></span> </div> The tools I have available are JS and YUI2. I can do something like this: doc = document.getElementById('test'); notes = doc.getElementsByClassName('four'); //or doc = YAHOO.util.Dom.get('#test'); notes = doc.getElementsByClassName('four'); These do not work in IE. I get an error

YUI3: How would I trigger an event?

流过昼夜 提交于 2019-12-13 21:27:15
问题 Suppose I have a click event on a link/button/etc. var myButton = Y.one('.button'); myButton.on('click', function() { // code }); There is something else happening on the page that I want to trigger a click event on this button. How would I do this? I saw YUI3's fire() method, but it looked like that was designed for custom events. If I am supposed to use fire(), then will myButton.fire('click') work? (I'm looking for the equivalent of jQuery's .trigger() method, which works on DOM events or

How to check if a user accepts cookies

吃可爱长大的小学妹 提交于 2019-12-13 17:48:45
问题 Using java script,how to check if a user accepts cookies for a domain. Does YUI has any such component to check ? 回答1: Library: <script type="text/javascript"> function createCookie(name, value, days) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else expires = ""; document.cookie = name + "=" + value + expires + "; path=/"; } function readCookie(name) { var nameEQ = name + "="; var

Making Divs Draggable But Contained Using jsPlumb With YUI

此生再无相见时 提交于 2019-12-13 16:22:39
问题 I'm trying to use jsPlumb with the YUI framework to make some divs draggable and connected. However, I find when I try to make the divs draggable but contained within their parent, using: jsPlumb.draggable("window2", { containment:"parent" }); the div is still draggable outside the bounds of its parent. If I set the parent's css to "overflow: hidden" I won't see the div when it's dragged beyond the parent's bounds but I'll still see the connector to the div, which looks really awkward. To see

YUI with emberjs Datatable with ember dynamic link

穿精又带淫゛_ 提交于 2019-12-13 06:27:18
问题 I recently discover YUI, and I wanted to use it with my ember app. I wanted to generate a dynamic link from ember but inside a datatable widget of YUI. I want to add a new column name "detail" and put the link of every enquriry in it< I have this so far : App.Enquiries.reopenClass({ data: null, findAll: function() { var result = []; $.ajax({ url: host + 'mdf/enquiry', type: 'GET', accepts: 'application/json', success: function(data) { data.enquiries.forEach(function(enquiry){ var model= App