<script>
function validateEmail(this_val,this_dom){
var base_url = $('#path').val();
var a = this_val;
var filter = /^[a-zA-Z0-9]+[a-zA-Z0-9_.-]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/;
if(a.length==0){
this_dom.next().html("กรุณากรอก Email!");
return false;
}
}
function validatePass1(){
var base_url = $('#path').val();
var this_pass = $("#password");
var a = this_pass.val();
//it's NOT valid
if(a.length <6){
this_pass.next().html(' รหัสผ่านต้อง ไม่ต่ำกว่า 6 ตัว');
return false;
}
//it's valid
else{
this_pass.next().html("<img src='"+base_url+"images/true.png' width='15'>");
//validatePass2();
return true;
}
}
function validatePass2(){
var base_url = $('#path').val();
var this_pass = $("#password");
var this_con = $("#re_password")
var a = this_pass.val();
var b = this_con.val();
// ::::::::::::::::: ONCLICK SUBMIT :::::::::::::::::::::;
$('#btn_submit').live('click',function(){
var c_company = validate_empty($('#c_company').val(),$('#c_company'));
var c_detail = validate_empty($('#c_detail').val(),$('#c_detail'));
var c_address = validate_empty($('#c_address').val(),$('#c_address'));
var zipcode = validate_empty($('#zipcode').val(),$('#zipcode'));
var tel = validate_empty($('#tel').val(),$('#tel'));
var c_address2 = validate_empty($('#c_address2').val(),$('#c_address2'));