mootools

localStorage Size Limits… What are the options?

走远了吗. 提交于 2019-12-18 08:26:20
问题 I plan to use persistant localStorage in one of my projects and i have found out that the size limitation is 5 MB (chrome). I searched other frameworks which implmented the same thing, like Mootools, Dojo, Lawnchair but i couldnt find out what are their size limitations. Does anyone know what are the size limitation is in these. And what other options are there which i can use if not the one already stated above. 回答1: localstorage limits are not tied to the javascript framework, but to the

Detect if Download is Complete

元气小坏坏 提交于 2019-12-18 06:57:15
问题 I have a very simple and standard PHP force download script. How do I check if/when the download has completed in order to notify the user on the clientside? I don't even need to show the progress in real time, I am only interested in the very specific event: "when the download completes". Based on my research, it seems like it would have to be determined from the serverside as there is no ondownloadready event and I don't think it is possible to intercept browser events. So it seems that my

Determine whether element has fixed or percentage width using JavaScript

孤者浪人 提交于 2019-12-18 05:06:22
问题 Using Mootools Element.Dimensions I can get the computed size, in pixels, of any element. However, I can find no way of telling whether an element has been sized using pixel or percentage values (other than in the special case of its having an inline style). Is there a sensible way of doing this? The only solution I can think of (which is so hideous that it barely deserves the name) is to walk through the document stylesheets, looking for selectors that match the target element and then

How do I inject javascript to a page on IE 8?

不想你离开。 提交于 2019-12-18 02:54:05
问题 Lets suppose that I have the following markup: <div id="placeHolder"></div> and I have a JavaScript variable jsVar that contains some markup and some JavaScript. By using Mootools 1.1 I can inject the JavaScript content into the placeholder like this: $('placeHolder').setHTML(jsVar); This works in Firefox, Opera, and even Safari and the resulting markup looks like this: <div id="placeHolder"> <strong>I was injected</strong> <script type="text/javascript"> alert("I was injected too!"); <

Javascript Object returns junk values

泪湿孤枕 提交于 2019-12-17 21:33:36
问题 I'm trying to assign values to a javascript object and when doing so, some junk values end up in there which seem like array methods like 'push', 'pop','splice' etc. The following is my code. function myTest(){ var userArray = new Object(); var req = new Request.JSON({ url: '/myTest.php', method: 'post', noCache: true, data: 'userID=999', onSuccess: function(json){ for(var key in json){ userArray = json[key]; for (var row in userArray){ alert(row) // This returns values like '$family','push',

Why is jQuery so widely adopted versus other Javascript frameworks? [closed]

血红的双手。 提交于 2019-12-17 21:26:01
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I manage a group of programmers. I do value my employees opinion but lately we've been divided as to which framework to use on web

How do I track and debug JavaScript memory leaks in Firefox?

怎甘沉沦 提交于 2019-12-17 18:36:56
问题 I've been trying to track this one for literally a month now without any success. I have this piece of code on an car advertising website which basically allows thumbnails to rotate in search results given that a car has multiple pictures. You can see it in action at the following: http://www.abcavendre.com/4506691919/ It is built on the mootools 1.2 framework. The problem is that this script, under Firefox 3, consumes a rather large amount of memory overtime when a page is full of those

How do I track and debug JavaScript memory leaks in Firefox?

纵饮孤独 提交于 2019-12-17 18:35:55
问题 I've been trying to track this one for literally a month now without any success. I have this piece of code on an car advertising website which basically allows thumbnails to rotate in search results given that a car has multiple pictures. You can see it in action at the following: http://www.abcavendre.com/4506691919/ It is built on the mootools 1.2 framework. The problem is that this script, under Firefox 3, consumes a rather large amount of memory overtime when a page is full of those

CSS selector for targeting only immediate children and not other identical descendants

给你一囗甜甜゛ 提交于 2019-12-17 16:26:44
问题 I have a nested sortable list that can have items dynamically added or removed and can be nested n-levels deep. On nesting, a new ul element is injected into whatever li element is selected to be the parent. The initial state of the list is something like the following: <ul id="parent"> <li id="One"><a href="" class="listLink"><span class="position">1</span>One</a></li> <li id="Two"><a href="" class="listLink"><span class="position">2</span>Two</a></li> <li id="Three"><a href="" class=

Adding event to element inside Google Maps API InfoWindow

社会主义新天地 提交于 2019-12-17 10:41:31
问题 I want to put a form with input field and submit button inside a Google Maps API (v3) InfoWindow. When submitted I would like to call a function that initiates the directions service using the address entered into the input field. Here's my code (I'm currently only testing whether the directions event is being fired. I've written the full getDirections() event and can confirm it works and returns directions when fired properly): I tried adding an event listener using MooTools, like this: var