All pastes #365995 Raw Edit

Stuff

public text v1 · immutable
#365995 ·published 2007-02-21 12:28 UTC
rendered paste body
<SCRIPT>
var langjs = new Array();
langjs["crazillaformserrormsgs12"] = "The email is invalid";
langjs["crazillaformserrormsgs13"] = "Invalid security code";



var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i

function checkmail(e,divname){
	var returnval=emailfilter.test(document.getElementById(e.value))

	if (returnval==false){

		errormsglangjs =  langjs["crazillaformserrormsgs12"];
		document.getElementById(divname).innerHTML = errormsglangjs;

		return false;
	} else {
		document.getElementById(divname).innerHTML = '';
		return true;
	}
	return returnval
}

</SCRIPT>

<FORM id='MyForm1'  name='MyForm1'  method='post' action='ajaxformcheck.php'  class="xh-form">

<div class='form-container'>
<fieldset><legend>Form1</legend>
<div><label for='MyForm1emailInputfield'  class='error' >email <em>*</em></label>
<input name='email' type='text' id='MyForm1emailInputfield' value='' maxlength='45'  class='error'   onblur="MinMax(this,'1','45','MyForm1emailError');checkmail('document.MyForm1.MyForm1emailInputfield','MyForm1emailError')"   />
<p class='note' id='MyForm1emailError'></p></div>