title: Why is this MooTools Javascript not working in IE
body: <p>All I want to do is create an input with an initialised value. Then when focused it clears the text field. however on blur and when the field is empty it should return its initialised value. It should also work with password fields. This is what i came up with its not working in ie.</p>
  
  <p>Error message
  <img src="https://i.stack.imgur.com/E3vYK.jpg" alt="enter image description here"></p>
  
  <pre><code>      $$('.default-text').each(function(item){
  
          item.store('default-value', item.get('value'));
  
         if(item.get('type') == 'password') {
              item.store('default-type', 'password');
              item.set('type', 'text');
              item.addEvent('keyup',function(el){
                  if(item.get('value') != item.retrieve('default-value')) {
                      item.set('type', 'password');
                  }
              });
          }            
          item.addEvent('focus',function(el){
              if(item.get('value') == item.retrieve('default-value')) {
                  item.set('value','');
              }
          });
          item.addEvent('blur',function(){
              if(item.get('value') == '') {
                  item.set('value', item.retrieve('default-value'));
                  if(item.retrieve('default-type') == 'password') {
                      item.set('type', 'text' );
                  }
              }
          });
      });
  </code></pre>