Form validator with tips binder

Find code here before you post.

Form validator with tips binder

Postby linb » Sat Apr 27, 2013 3:36 am

   
Class('App.tech_form_v2', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI TAD Tools
var host=this, children=[], append=function(child){children.push(child.get(0))};

append((new xui.UI.Input)
.setHost(host,"input2")
.setLeft(210)
.setTop(70)
.setWidth(260)
.setValueFormat("^-?(\\d\\d*\\.\\d*$)|(^-?\\d\\d*$)|(^-?\\.\\d\\d*$)")
.setTips("Input number please")
.setTipsErr(": (")
.setTipsOK(": )")
.setTipsBinder("divB1")
);

append((new xui.UI.Div)
.setHost(host,"div12")
.setLeft(170)
.setTop(30)
.setWidth(430)
.setHeight(20)
.setHtml("Format Validator (example : only number) -- binder tips info to a Div")
);

append((new xui.UI.Div)
.setHost(host,"div13")
.setLeft(60)
.setTop(70)
.setWidth(130)
.setHeight(20)
.setHtml("Using ValueFormat")
);

append((new xui.UI.Div)
.setHost(host,"divB1")
.setLeft(490)
.setTop(70)
.setWidth(230)
.setHeight(20)
.setHtml("Using ValueFormat")
);

return children;
// ]]code created by CrossUI TAD Tools
}
}
});
   
linb
Site Admin
 
Posts: 102
Joined: Thu Apr 25, 2013 6:51 am

Return to CrossUI Code Snaps

Who is online

Users browsing this forum: No registered users and 1 guest

cron