yui

Do javascript variables have a storage limit?

时光怂恿深爱的人放手 提交于 2019-11-30 18:25:29
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 ssube Yes, objects and arrays have storage limits. They are sufficiently large to be, for most purposes, theoretical. You will

Dynamically add data to a javascript map

不问归期 提交于 2019-11-30 06:25:58
问题 Is there a way I can dynamically add data to a map in javascript. A map.put(key,value) ? I am using the yui libraries for javascript, but didn't see anything there to support this. 回答1: Well any Javascript object functions sort-of like a "map" randomObject['hello'] = 'world'; Typically people build simple objects for the purpose: var myMap = {}; // ... myMap[newKey] = newValue; edit — well the problem with having an explicit "put" function is that you'd then have to go to pains to avoid

What's this UI pattern called?

扶醉桌前 提交于 2019-11-30 02:36:44
I'm trying to figure out what this sort of thing is called, and eventually how I can create one in a web browser. It looks like this (screenshot of the first app that came to mind): The specific component/pattern I'm looking for is the two list boxes ("Included Gear" and "Excluded Gear") that represent inclusion/exclusion of items from a set. I'm not really looking for the WPF name (if there is one) but it might be helpful. I am looking for the name of this thingy, if there is one, and if you really want to make my day, you can point me toward a jQuery or YUI way of making one of these dealies

Dynamically add data to a javascript map

别来无恙 提交于 2019-11-29 23:31:35
Is there a way I can dynamically add data to a map in javascript. A map.put(key,value) ? I am using the yui libraries for javascript, but didn't see anything there to support this. Well any Javascript object functions sort-of like a "map" randomObject['hello'] = 'world'; Typically people build simple objects for the purpose: var myMap = {}; // ... myMap[newKey] = newValue; edit — well the problem with having an explicit "put" function is that you'd then have to go to pains to avoid having the function itself look like part of the map. It's not really a Javascripty thing to do. 13 Feb 2014 —

how to implement facebook like notification?

安稳与你 提交于 2019-11-29 19:47:07
I am trying to implement a Facebook-like live notifications system to notify users whenever someone adds them as friend, like their post or posts replies to their comments. All the database and PHP part is done, but I can't figure out how to implement it like Facebook has. Whenever someone likes/comments on your post in Facebook the light blue box appears at the bottom left corner of the screen. This happens as soon as someone hits like button or posts comment in Facebook. I would like to know what I should do to implement this. Using YUI or any JavaScript framework I can query a database

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

ε祈祈猫儿з 提交于 2019-11-29 13:49:20
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. Mark Coleman You could do something like this. var intervalID, childWindow; childWindow = window.open("http://www.google.com");

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

 ̄綄美尐妖づ 提交于 2019-11-29 12:40:26
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.DatePicker({ container : datumInputFieldSelector, mask : '%d.%m.%Y', calendar : { firstDayOfWeek : 1,

Drag and drop elements into an iframe. Droppable area has wrong coordinates and collisions are wrong

白昼怎懂夜的黑 提交于 2019-11-29 08:28:06
问题 I need to implement drag and drop functionalities in a web application between elements present in a web page, and elements inside an iframe (before you start complaining about iframes, I NEED it for technical reasons, it's not an option). I have elements in the page that can be dragged into target droppable elements inside an iframe. I've managed to do it with both jQuery UI and YUI, though both libraries present the same problem: the target element (droppable target) coordinates are

YUI Reset CSS Makes <strong><em>this not work</em></strong>

前提是你 提交于 2019-11-29 04:02:05
This line in YUI's Reset CSS is causing trouble for me: address,caption,cite,code,dfn,em,strong,th,var { font-style: normal; font-weight: normal; } It makes my em not italic and my strong not bold. Which is okay. I know how to override that in my own stylesheet. strong, b { font-weight: bold; } em, i { font-style: italic; } The problem comes in when I have text that's both em and strong . <strong>This is bold, <em>and this is italic, but not bold</em></strong> My rule for strong makes it bold, but YUI's rule for em makes it normal again. How do I fix that? palmsey If your strong declaration

How can I generate Dynamic Javascript?

做~自己de王妃 提交于 2019-11-29 01:14:02
问题 I render a page using YUI. and depending on the user I need to change how it is rendered. This change is not something that can be parametrized, it is drastic and different for each user. Please tell me how can I generate Javascript dynamically? 回答1: I personally use a php file to pass a JavaScript object made up of some basic session and internal settings, nothing mission critical as passing information to the client isn't overly secure, but I believe it might follow the same principles as