I have a simple form on a page loading Mootools and JQuery. JQuery is not in conflict mode, which does not seem to be causing any problems.
There is a form element called "name" -
<input class="required" id="sendname" name="sendname" value="">
And I'm trying to attach a click event to it using Mootools to update something else when I click on the name:
$('sendname').addEvent('click', function(e){
});
The problem is that the click event is never added.
This error appears on boot:
Uncaught TypeError: Cannot call method 'addEvent' of null
When I try to interact with an item in the js console, I get the following error:
> $('sendname').setProperty('value', 'test');
TypeError: Object sendname has no method 'setProperty'</strike>
EDIT: The previous one was fixed by downloading newer Mootools. However, the click event still does not work correctly, although it does not cause errors or warnings.
, . , jQuery, , $ , , , noConflict . ?