mootools

How to set value for the form element using mootools

I have a form that have input element and the select element with multi select. so how can I set value for the input element and select element in mootools. ...

Mootools Request to change javascript code?

So I am planning on dynamically changing a page's content by fetching it from another page. To do so, I used Mootools' Request class: var tabContent = new Request({ url: 'foo/bar/baz.php', onSuccess: function(data) { $('tab_container').innerHTML = data; } }).send(); In any case, the HTML is fetched fine, and retur...

Mootools: How to Disallow `var drag` depending on `checkbox` checked?

Mootools: How to Allow and Disallow var drag depending on checkbox checked or not? window.addEvent('domready',function() { var z = 2; $$('#dragable').each(function(e) { var drag = new Drag.Move(e,{ grid: false, preventDefault: true, onStart: function() { e.setStyle('z-index',z++); } }); }); ...

Mootools: How to get `morpha.start()` after 2sec `mouseenter`?

Mootools: How to get morpha.start() after 2sec mouseenter? window.addEvent('domready',function() { var morph = new Fx.Morph('resize',{duration:700,delay:400}); $$('#resize').addEvent('mouseenter',function(e){ e.stop(); morpha.start({ width: '200px', height: '100px' }); }//It does not work on adding ',2000' he...

Mootools: How to Disallow `mouseenter` and `mouseleave` event when checkbox checked?

Mootools: How to disallow mouseenter and mouseleave event when checkbox checked? window.addEvent('domready',function() { var z = 2; var e = document.id('draggable'); var drag = new Drag.Move(e, { grid: false, preventDefault: true, onStart: function() { e.setStyle('z-index',z++); } ...

onHashChange running onLoad... awkward.

So I'd like my page to load content if a window's hash has changed. Using Mootools, this is pretty easy: $extend(Element.NativeEvents, { hashchange: 1 }); and then: window.addEvent('hashchange', function() {}); However, the hashchange event is firing when the page is being loaded, even though the specification require it not t...

Private Methods in a Mootools Class

I'm relatively new to using oop in Javascript, and I'm wondering what the best practice is for private methods. Right now, I'm using mootools to create my classes and I'm simulating private methods by prefixing them with an underscore and forcing myself not to call the method outside of the class. So my class looks like: var Notifier ...

Mootools - Adding exra form fields on an event

I am working a project currently in which the user can add multiple news headlines and news articles, the number they add is entirely up to the user, for this reason the form they first see only has room for 1 headline and 1 article, to add another article/headline there is a 'button' that has a click event on it, currently I have this i...

Javascript detect scrollbar in textarea

Hi, I was wondering if anybody knows how I would go about detecting when the scrollbar appears inside a text area. I am currently using mootools for my JavaScript but I am really having issues getting it to detect a scrollbar. Any example would be useful thank you!. Jamie ...

Mootools each on childs

Hello everybody, I am working on a script what uses MooTools, and i want to select all input's in one element, but the problem is that I don't know the ID of the element, the element is a variable. (In The function is formElement = $('form#aForm') ) Does someone know how I can use the each function on all input in one element. Now I am...

How to make Joomla main content and modules columns match height dynamically?

Hi I have a Joomla site with a template that has 2 columns. One for the main content and the other for modules. On different pages either the content column is shorter than the module column or vice versa. How can I ensure that the 2 columns are always of the same height so that they both meet up equally at the footer on any page? ...

Is there a way to find all elements matching a certain style using the DOM?

I want an array of all elements that have fixed position. This is what I've got so far (mootools code) $$('*').filter(function(aEl){ return aEl.getStyle('position')=='fixed' }); Is there a more direct way to do this? ...

My Javascript (and Mootools) function is not returning true or false

Hi Guys/Gals I have the following function: function validateField(query) { new Request.JSON({ onRequest : function() { }, onSuccess : function(json){ return true; }, data : query + '&validate=true', url : base + 'ninjquiry.php' }).send(); } N...

Mootools events, callable?

So I have an element that has an onClick event thusly: var foobar = $('element').addEvent('click', function() { // some code here }); But I want to call the action from somewhere else in the script, would it be possible to do such a thing, i.e." foobar.click ? ...

Check if jQuery or mooTools are loaded

Hello ! In my project I am using jQuery in client side and mooTools in admin side. I would like to be able to write some part of code (google maps functions, etc) which will be common for both of that libraries. Is it possible to check if jQuery or mooTools libraries are loaded and use proper behaviours ? $(document).ready(function() ...

How to implement jQuery on top of existing Mootools site

I have taken over the development of a site, which is 50% complete. The previous developer has been using Mootools for a few functions thus far, I am far more proficient in jquery (i.e. have no knowledge of Mootools), and so wish to include the jquery library and use jquery from here on in. Can anyone offer any links, guidelines or adv...

Slick vs. Sizzle -- Pros and Cons of CSS selector engines

When would I want to use Slick and when would I want to use Sizzle? What are the pros and cons of each as a standalone CSS selector engine? How easily can Slick be used with JQuery? Can Sizzle be used with Mootools? ...

Mootools1.1 what is element.$tmp ?

i see it function(element) { element.$tmp.myTitle = 'title'; element.$tmp.myText = 'text'; } anybody know ? when i bring this function to use in mootools1.2 it not define $tmp $tmp? use for Tips plugin mootools ...

a new approach to web development: request for tools and components recommendations

I'm searching for the best possibility to write web applications that are heavy with JavaScript . So I'd like to present you my ideas and ask for your opinions and alternatives on this, please :) 1 year ago I started looking for possibilities for web development besides PHP. I found JSP and Django. I decided to go with Django. After sta...

duplicate ajax requests at random

I noticed that sometimes(randomly) my Mootools ajax request gets send twice. The second request succeeds right away but the first just keeps waiting indefinitely. I'm not sure if it's a bug in Mootools or something I've done. This has been verified with firebug in firefox and developer console in chrome. I couldn't verify it in IE, but ...