jquery ui - French character in Ajax Validation -
french characters not beingness correctly passed on pages multi-part form submit. however, on pages without multi-part form submit (browse field), french characters added database. how can correctly submit forms such characters on first pages?
this problem occurred when changed our server tomcat 5.5 6. have used charset=utf-8
code ajax validation:
function v2validatedataajax(name,strvalidatestr,objvalue,strerror) { var epos = strvalidatestr.search("="); var command = ""; var cmdvalue = ""; var firstpos; var lastpos; if(epos >= 0) { command = strvalidatestr.substring(0,epos); cmdvalue = strvalidatestr.substr(epos+1); } else { command = strvalidatestr; } switch(command) { case "wotdescalpha": { //alert('inside'); var charpos = objvalue.search("[^ÂâÀàÆæÇçÉéÊêÈèËëÎîÏïÑñÔôÛûÙùa-za-z0-9-_&,()+.#!:;><?@/{} ]"); //alert("after"); var firstpos = (objvalue).charat(0); /*if( firstpos == " " || firstpos == "." || firstpos == "_" || firstpos == "-" ) { strerror = "first character should alphabet or number. special characters not allowed."; alert(strerror); homecoming false; } */ //alert("objvalue.length:"+objvalue.length); //alert("charpos:"+charpos); //alert("strerror:"+strerror); if(objvalue.length > 0 && charpos >= 0) { if(!strerror || strerror.length ==0) { strerror = name+":"+strerror; }//if alert(strerror); homecoming false; }//if break; }//case wotdescalpha . . . . . .
ajax jquery-ui jquery
No comments:
Post a Comment