mootools-events

How to programmatically click an element with MooTools?

In jQuery, I've done stuff like this in the past: $('#someCheckbox').click(); And everything works as if the user just clicked on the element normally. However the same doesn't work in MooTools: $('someCheckbox').fireEvent('click'); The checkbox doesn't get checked, nor do any of the bound event handlers fire. Is there a way to d...

Mootools appending html after an ajax request

Hello, I have an ajax call that looks like this, $('campaignType').addEvent('change', function(){ alert($('campaignType').value); var request = new Request({ method: 'get', url: '/admin/admin_' + $('campaignType').value + '.php', onRequest:function() { alert('Request has been made, please be patient') }, on...

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...

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...

Mootools Click Event Problem

Hello! This peace of code works for the first click. but then it seems to not be able to get new ID from next click. the idea behind it is to show one piece of a form and with click on a button it hides first and shows second part. any idea what im doing wrong? i guess it has something to do with "this" but from my understanding it shoul...

Mootools problem when zoomed in

Hi! I am using Mootools extensively for a site which I am developing. But recently I noticed a problem that the animations slow down alot when I zoom (using the browsers Zoom In) in into the site. What could be a possible reason for this problem ? Or is this problem inherit in Mootools itself. This happens in Chrome 6.0.472 as wel...

mootools show/hide div dependent on whether or not checkbox is checked

I have a checkbox I wanting to show a fieldset in a form dependent on whether or not the checkbox is clicked or not? i.e if the checkbox is checked don't show the fieldset and if it is not show the fieldset. My markup looks like this, <fieldset class="toplined"> <label>Keep Image</label> <input type="checkbox" name="update_image[]" va...