astralaaron Posted January 21, 2012 Share Posted January 21, 2012 Hi I am trying to understand custom properties a little better. all I am trying to do is set a focused to true or false if they are clicked on a text area. I can accomplish it without the custom properties but I am just trying to learn var elm2; elm2 = document.forms['quickmessage'].elements['email']; elm2.focused=false; elm2.onfocus=function() { this.focused=true; alert('test'); alert(this.focused);}; elm2.onblur=function() { this.focused=false;}; the onfocus alerts test and false every time Link to comment Share on other sites More sharing options...
astralaaron Posted January 21, 2012 Author Share Posted January 21, 2012 looks like it works now that i took the this. off Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.