IE6.x doesn’t work again with some Mootools code

Following my yesterday work, I have to add a new check on change event for the form in the script.

The idea is to send a request for each change in the form.
It’s easy to do it with Mootools, just add the addEvent() method
This code works fine with Firefox..and Co:

$('myform').addEvent('change', function() {        request.send($('myform'));});
BUT with Internet Explorer 6.x, it doesn’t work at all!
Yes again.. I know.

So, another way to get the same result is to use the magic function $$
With it, it’s easy to get all form elements to check their state (on change status)

$$('^myform_').addEvent('change', function() {        request.send($('myform'));});
Literally, we follow all the id elements starting by “myform_”, for example:
<input type="text" name="myform_text1" id="my_form_text1" />
Of course, you have to start all of your form elements name like this..
It’s not a problem for me, I do it by convention.
Advertisements

3 thoughts on “IE6.x doesn’t work again with some Mootools code

  1. Well.. that’s a good question!it’s difficult to choose between frameworks (same problem with php frameworks, template engine, etc…)I chose Mootools because it chose by the CMS joomla! and one of my clients decided to migrate a lot of their websites to Joomla!Then, It’s just a prevision for the futur!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s