javascript - Check e-mail function -


i'm trying alert message if user doesn't complete e-mail form. not working.

function reg_email_check() {     var url = "/poll/email_check.php";     var para = "email="+encodeuricomponent($f('email'));     var myajax = new ajax.request(         url,         {             method: 'post',             asynchronous: false,             parameters: para,             oncomplete: return_email_check         }); } function return_email_check(req) {     var msg = $('email_msg_id');     var result = req.responsetext;     switch(result) {         case '110' : msg.update('メールアドレスを正しく入力してください。').setstyle({ color: 'red' }); break;         case '000' : msg.update('!このメールアドレスは登録済です。').setstyle({ color: 'red' }); break;         case '130' : msg.update('このメールアドレスは登録可能です。 ').setstyle({ color: 'blue' }); break;         default : alert( 'エラー.\n\n' + 'もう一度お試しください。' ); break;     }     //$('email_check').value=result; } 

what need call here?

function checkfm() {     //id関連スクリプト     if(document.url.value.length==0)     {         alert("insert e-mail");         document.url.focus();         return;     } } 


Comments