I have a form. I include Dojo. Everything works fine. I use Dojo to change the class, values and attributes of input elements based on user input(sort of like validation).
The problem is, because of IE, I'm required to create a new input element(that I know of) if I want to change the 'type' of an input from 'text' to 'password'.
Once I create this element(which has all the same attributes and same id) as the element that it replaced, my Dojo funtions such as ...
dojo.query("#password2")
.connect("onclick",function(){
// if password2 is equal to the default text
if( this.value == "Confirm your password" ){
this.value = "";
UpdateType( this ); // this is the function that dynamically creates the new input element to have a type of 'password'
}
dojo.query("#list_password2").removeClass("error");
});
... no longer work on the newly created elements. I have run into this problem before and used to use jquery and had a livequery plugin that reassigned the events to elements. Is there a plugin or native functionality for Dojo to do this that I'm unaware of?