Questions tagged [mootools-events]
73 questions
2
votes
3 answers
Caret position not keeping track?
What I'm trying to do is put key codes in an array, to do some interesting stuff with later on. So, I capture the keystrokes, get the caret position and put the key code in the array (with some help from MooTools):
var keyArray =…

kasimir
- 1,506
- 1
- 20
- 26
2
votes
1 answer
Mootools event causes infinite loop in IE7/IE8
I have difficulties getting this to work in IE7 (and IE8).
Its a VERY reduced part of a much more complex script. So bear in mind that the methods and the structure cannot change too much.
In IE7 I get a infinite Loop when selecting one of the…

Mike
- 5,416
- 4
- 40
- 73
1
vote
3 answers
MooTools event delegation: How to reference child element inside callback?
Having this piece of HTML:
And this piece of JS:
$('modal').addEvent('change:relay(.country)',…

Alejandro García Iglesias
- 16,222
- 11
- 51
- 64
1
vote
1 answer
mootools tool tips not showing for Request.HTML content
I'm having some trouble with adding tips to a Request.HTML
function. I have a div which refreshes its content every 30 seconds.
The content returned has a series of divs with the class name
".liveReader".
Here's the JS I have to initiate the…

Matt Facer
- 3,103
- 11
- 49
- 91
1
vote
1 answer
How to extend a native mootools method
Is it possible to extend the addEvent function in mootools to do something and also calls the normal addEvent method? Or if someone has a better way to do what I need I'm all years.
I have different 'click' handlers depending on which page I'm on…

Yohan Leafheart
- 860
- 1
- 11
- 27
1
vote
1 answer
Confusion On Using Mootools And The 'This' Keyword
I am trying to assign an event handler to a class I have created in Mootools but I cannot seem to access any of the variables that I created for the class. Like so:
var newPerson = new Class({
initialize: function(name)
{
this.firstName = name;
…

Pat Tate
- 23
- 1
- 3
1
vote
1 answer
Two button submit breaks other events on page (mootools)
I am wanting to use two button form and created the following which works. It however breaks any other events on the page but I can't figure out why. Is there a better way?
window.addEvent('domready', function() {
…

JJohn
- 75
- 1
- 9
1
vote
2 answers
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,
1
vote
4 answers
Mootools appending html after an ajax request
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',
…

sea_1987
- 2,902
- 12
- 44
- 69
1
vote
2 answers
Dom Element onclick (MooTools :: optionally)
Consider the following example:
function async_callback(array1, array2, array3) {
// All arrays are equal length
for(var i = 0; i < array1.length; i++) {
var myElement = new Element('div', { 'id': 'dvMy' + i, 'events': { 'click': function()…

Theofanis Pantelides
- 4,724
- 7
- 29
- 49
1
vote
0 answers
MooTools - Check if Class has event
I want to set a default function for an event of a Class and need to check attached events of Class instance.
As i found out, Events implementations have $events property to store events and i could check it. Is it a better way?

AHHP
- 2,967
- 3
- 33
- 41
1
vote
3 answers
mootools event listener disappears after element.innerHTML is changed
I putting together a page that will display a set of stored values. I am using mootools and AJAX calls to update the values without needing to refresh the page each time the user selects a new item from the drop down menus.
the HTML each line looks…

Aaron Luman
- 635
- 1
- 10
- 29
1
vote
1 answer
Mootools delete event not working after Drag + droppable event
I need to fix a few things here:
The delete button does not work after the drop event. The delete only works on items not in the dropzone. Not sure what is wrong here.
also, it would be better to add the delete button to each dropped item instead…

Craig Martin
- 161
- 1
- 1
- 12
1
vote
2 answers
MooTools events not firing
I've recently been asked to work on a few websites. One of these websites wants to be "more interactive" and they showed me a site they would like to emulate.
I'm not very good with writing my own scripts, especially with regards to DHTML, so I use…

Jhecht
- 4,407
- 1
- 26
- 44
1
vote
1 answer
mootools: make ajax callbacks to work with clicked element
Suppose I have a number of red colored links, and want to add a click event to them such that when it fires, it sends HREF attribute of link to server (as an AJAX request), and on success, the link color will be changed to green.
I want something…

MortezaE
- 378
- 3
- 13