Thursday, December 07, 2006

the dojo


dojo.require("dojo.event.*");
dojo.event.connect(dojo, "loaded", "init");
function init() {
dojo.event.connect(["userName", "nickyName", "email1", "btnRegister" ], "onfocus", infocus);
dojo.event.connect(["userName", "nickyName", "email1", "btnRegister" ], "onblur", outfocus);
dojo.byId("userName").focus();
dojo.byId("userName_tips").className = "tipSpan";
}
function infocus(evt) {
evt = dojo.event.browser.fixEvent(evt);
dojo.byId(evt.target.id + "_tips").className = "tipSpan";
}
function outfocus(evt) {
evt = dojo.event.browser.fixEvent(evt);
dojo.byId(evt.target.id + "_tips").className = "tipSpan1";
}

No comments: