email validator problem

-Dman100-
-Dman100- used Ask the Experts™
on
I have a javascript function that validates my web form. When I add a emailcheck function it causes my validation to fail.  I know the email validation fuction works because I use it in other pages, so I'm not quite sure why it is breaking on this page.

I've attached validation code with and without the email check function.  It works when I don't include the email check function, but as soon as I introduce the email check function it causes the validation to fail.

I can't figure out what is causing the email check to fail?

For example, I can enter myname@centurytel.net and it won't accept it?  

Thanks for any help.
function validate(){
		var flag = true;
		var container = document.getElementById("inputContainer");
		var ckbxContainer = document.getElementById("checkboxContainer");
		var firstnameErrMsg = document.getElementById('fnameErrMsg');
		var lastnameErrMsg = document.getElementById('lnameErrMsg');
		var emailErrMsg = document.getElementById('emailErrMsg');
		var checkboxErrMsg = document.getElementById('ckbxErrMsg');
		var inputs = container.getElementsByTagName("input");
		var checkboxes = ckbxContainer.getElementsByTagName("input");
		var isSelected = false;
		
		for (var i = 0; i < checkboxes.length; i++){
			if (checkboxes[i].type == "checkbox") {
				if (checkboxes[i].checked == true) {
					isSelected = true;
				}
			}
		}
		
		for(var i = 0; i < inputs.length; i++){
			var str = inputs[i].name;
			if (str.indexOf('fname') != -1) {
				if (inputs[i].value == "") {
					firstnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					firstnameErrMsg.style.display='none';
				}		
			}
			if (str.indexOf('lname') != -1) {
				if (inputs[i].value == "") {
					lastnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					lastnameErrMsg.style.display='none';
				}		
			}
			if (str.indexOf('email') != -1) {
				if (inputs[i].value == "") {
					emailErrMsg.style.display='block';
            		flag = false;
				}
             	else {
                	emailErrMsg.style.display='none';
             	}			
			}
			if (!isSelected) {
				checkboxErrMsg.style.display='block';
				flag = false;
			}
			else {
				checkboxErrMsg.style.display='none';
			}
		}	
		if(flag == false){
			return flag;
		}else{
			return flag;
		}
	}

Open in new window

function checkemail(email){
        var str=email.value;
        var filter = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;

        if (filter.test(str)) {
            return true;
        }else{
            return false;
        }
    }
	
	  
    function validate(){
		var flag = true;
		var container = document.getElementById("inputContainer");
		var ckbxContainer = document.getElementById("checkboxContainer");
		var firstnameErrMsg = document.getElementById('fnameErrMsg');
		var lastnameErrMsg = document.getElementById('lnameErrMsg');
		var emailErrMsg = document.getElementById('emailErrMsg');
		var checkboxErrMsg = document.getElementById('ckbxErrMsg');
		var inputs = container.getElementsByTagName("input");
		var checkboxes = ckbxContainer.getElementsByTagName("input");
		var isSelected = false;
		
		for (var i = 0; i < checkboxes.length; i++){
			if (checkboxes[i].type == "checkbox") {
				if (checkboxes[i].checked == true) {
					isSelected = true;
				}
			}
		}
		
		for(var i = 0; i < inputs.length; i++){
			var str = inputs[i].name;
			if (str.indexOf('fname') != -1) {
				if (inputs[i].value == "") {
					firstnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					firstnameErrMsg.style.display='none';
				}		
			}
			if (str.indexOf('lname') != -1) {
				if (inputs[i].value == "") {
					lastnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					lastnameErrMsg.style.display='none';
				}		
			}
			if (str.indexOf('email') != -1) {
				if (inputs[i].value == "") {
					emailErrMsg.style.display='block';
            		flag = false;
				}
             	else if (inputs[i].value != "") {
					var strEmail = inputs[i].value;
            		if (!checkemail(strEmail)) {
                		emailErrMsg.style.display='block';
                		flag = false;
             		} 
             		else {
                		emailErrMsg.style.display='none';
             		}	
				}			
			}
			if (!isSelected) {
				checkboxErrMsg.style.display='block';
				flag = false;
			}
			else {
				checkboxErrMsg.style.display='none';
			}
		}	
		if(flag == false){
			return flag;
		}else{
			return flag;
		}
	}

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
HainKurtSr. System Analyst

Commented:
I dont see any issue, but I rewrote that part
if (str.indexOf('email') != -1) {
				if (inputs[i].value == "") {
					emailErrMsg.style.display='block';
					flag = false;
				} else {
					var strEmail = inputs[i].value;
          if (!checkemail(strEmail)) {
          	emailErrMsg.style.display='block';
          	flag = false;
          } else {
          	emailErrMsg.style.display='none';
          }	
				}			
			}

Open in new window

HainKurtSr. System Analyst

Commented:
your function is somehow not working
<script>
function checkemail(email){
        var str=email.value;
        var filter = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;

        if (filter.test(str)) {
            return true;
        }else{
            return false;
        }
    }
</SCRIPT>

<input id=email><button onClick='alert(checkemail(email.value))'>Check</button>

Open in new window

HainKurtSr. System Analyst

Commented:
:)

use this function
function checkemail(email){
  var filter = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
  return filter.test(email);
}

Open in new window

HainKurtSr. System Analyst

Commented:
your issue was

function checkemail(email){
        var str=email.value;
...

you should pass an element to this function but you pas a string value...

either change the function with the 4 line version I posted above or call it like


var strEmail = inputs[i].value;
          if (!checkemail(strEmail)) {
-->
if (!checkemail(inputs[i]))

Open in new window

-Dman100-Software Consultant

Author

Commented:
Thanks for your help.  I tried using your email validator function, but all the validation is failing on me now.  The form doesn't validate at all.

Did I add the code incorrectly? I must have a syntax error somewhere?
function checkemail(email){
  		var filter = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
  		return filter.test(email);
	}
	  
    function validate(){
		var flag = true;
		var container = document.getElementById("inputContainer");
		var ckbxContainer = document.getElementById("checkboxContainer");
		var firstnameErrMsg = document.getElementById('fnameErrMsg');
		var lastnameErrMsg = document.getElementById('lnameErrMsg');
		var emailErrMsg = document.getElementById('emailErrMsg');
		var checkboxErrMsg = document.getElementById('ckbxErrMsg');
		var inputs = container.getElementsByTagName("input");
		var checkboxes = ckbxContainer.getElementsByTagName("input");
		var isSelected = false;
		
		for (var i = 0; i < checkboxes.length; i++){
			if (checkboxes[i].type == "checkbox") {
				if (checkboxes[i].checked == true) {
					isSelected = true;
				}
			}
		}
		
		for(var i = 0; i < inputs.length; i++){
			var str = inputs[i].name;
			if (str.indexOf('fname') != -1) {
				if (inputs[i].value == "") {
					firstnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					firstnameErrMsg.style.display='none';
				}		
			}
			if (str.indexOf('lname') != -1) {
				if (inputs[i].value == "") {
					lastnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					lastnameErrMsg.style.display='none';
				}		
			}
			if (str.indexOf('email') != -1) {
				if (inputs[i].value == "") {
					emailErrMsg.style.display='block';
            		flag = false;
				}
             	else if (inputs[i].value != "") {
					var strEmail = inputs[i].value;
            		if (!checkemail(strEmail)) {
                		emailErrMsg.style.display='block';
                		flag = false;
             		} 
             		else {
                		emailErrMsg.style.display='none';
             		}	
				}			
			}
		}			
			if (!isSelected) {
				checkboxErrMsg.style.display='block';
				flag = false;
			}
			else {
				checkboxErrMsg.style.display='none';
			}
		}	
		if(flag == false){
			return flag;
		}else{
			return flag;
		}
	}

Open in new window

-Dman100-Software Consultant

Author

Commented:
I changed the line:

if (!checkemail(strEmail)) {

Open in new window

to
if (!checkemail(inputs[i]))

Open in new window


But, it still bypasses all the validation?
function checkemail(email){
        var str=email.value;
        var filter = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		
        if (filter.test(str)) {
            return true;
        }else{
            return false;
        }
    }
	  
    function validate(){
		var flag = true;
		var container = document.getElementById("inputContainer");
		var ckbxContainer = document.getElementById("checkboxContainer");
		var firstnameErrMsg = document.getElementById('fnameErrMsg');
		var lastnameErrMsg = document.getElementById('lnameErrMsg');
		var emailErrMsg = document.getElementById('emailErrMsg');
		var checkboxErrMsg = document.getElementById('ckbxErrMsg');
		var inputs = container.getElementsByTagName("input");
		var checkboxes = ckbxContainer.getElementsByTagName("input");
		var isSelected = false;
		
		for (var i = 0; i < checkboxes.length; i++){
			if (checkboxes[i].type == "checkbox") {
				if (checkboxes[i].checked == true) {
					isSelected = true;
				}
			}
		}
		
		for(var i = 0; i < inputs.length; i++){
			var str = inputs[i].name;
			if (str.indexOf('fname') != -1) {
				if (inputs[i].value == "") {
					firstnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					firstnameErrMsg.style.display='none';
				}		
			}
			if (str.indexOf('lname') != -1) {
				if (inputs[i].value == "") {
					lastnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					lastnameErrMsg.style.display='none';
				}		
			}
			if (str.indexOf('email') != -1) {
				if (inputs[i].value == "") {
					emailErrMsg.style.display='block';
            		flag = false;
				}
             	else if (inputs[i].value != "") {
            		if (!checkemail(inputs[i])) {
                		emailErrMsg.style.display='block';
                		flag = false;
             		} 
             		else {
                		emailErrMsg.style.display='none';
             		}	
				}			
			}
		}			
			if (!isSelected) {
				checkboxErrMsg.style.display='block';
				flag = false;
			}
			else {
				checkboxErrMsg.style.display='none';
			}
		}	
		if(flag == false){
			return flag;
		}else{
			return flag;
		}
	}

Open in new window

HainKurtSr. System Analyst

Commented:
do you have a link? or post the full code since your validation is using lots of elements...

test the code below to see how it works... if you use this function insted of yours, no more change is required...
<script>
function checkemail(email){
  var filter = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
  return filter.test(email);
}
</SCRIPT>

<input id=email><button onClick='alert(checkemail(email.value))'>Check</button>

Open in new window

HainKurtSr. System Analyst

Commented:
you have one } extra somewhere...

try this code...


I also modified this code and added a "break" (to me it seemed a logicval error, you should break loop as soon as you find a checked checkbox)

		for (var i = 0; i < checkboxes.length; i++){
			if (checkboxes[i].type == "checkbox") {
				if (checkboxes[i].checked == true) {
					isSelected = true; break;
				}
			}
		}

Open in new window

HainKurtSr. System Analyst

Commented:
try this code
<script>
function checkemail(email){
  var filter = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
  return filter.test(email);
}

function validate(){
		var flag = true;
		var container = document.getElementById("inputContainer");
		var ckbxContainer = document.getElementById("checkboxContainer");
		var firstnameErrMsg = document.getElementById('fnameErrMsg');
		var lastnameErrMsg = document.getElementById('lnameErrMsg');
		var emailErrMsg = document.getElementById('emailErrMsg');
		var checkboxErrMsg = document.getElementById('ckbxErrMsg');
		var inputs = container.getElementsByTagName("input");
		var checkboxes = ckbxContainer.getElementsByTagName("input");
		var isSelected = false;
		
		for (var i = 0; i < checkboxes.length; i++){
			if (checkboxes[i].type == "checkbox") {
				if (checkboxes[i].checked == true) {
					isSelected = true; break;
				}
			}
		}
		
		for(var i = 0; i < inputs.length; i++){
			var str = inputs[i].name;
			if (str.indexOf('fname') != -1) {
				if (inputs[i].value == "") {
					firstnameErrMsg.style.display='block';
          flag = false;
				}	
				else {
					firstnameErrMsg.style.display='none';
				}		
			}

			if (str.indexOf('lname') != -1) {
				if (inputs[i].value == "") {
					lastnameErrMsg.style.display='block';
            		flag = false;
				}	
				else {
					lastnameErrMsg.style.display='none';
				}		
			}

			if (str.indexOf('email') != -1) {
				if (inputs[i].value == "") {
					emailErrMsg.style.display='block';
            		flag = false;
				}
             	else if (inputs[i].value != "") {
            		if (!checkemail(inputs[i])) {
                		emailErrMsg.style.display='block';
                		flag = false;
             		} 
             		else {
                		emailErrMsg.style.display='none';
             		}	
				}			
			}

			if (!isSelected) {
				checkboxErrMsg.style.display='block';
				flag = false;
			}
			else {
				checkboxErrMsg.style.display='none';
			}
		}	

	return flag;
}
</SCRIPT>

Open in new window

HainKurtSr. System Analyst

Commented:
also I modified this part as
if(flag == false){
			return flag;
		}else{
			return flag;
		}

-->

return flag;

Open in new window

-Dman100-Software Consultant

Author

Commented:
Hmmm, well, I tried your code, but it still catches a valid email as well as an invalid email.

I've attached the full page source.  Both with and without the emailcheck method so you can see when it works and when it does not work.

Thanks for your help!  I sincerely appreciate it.
Regards.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

	<html><head><link class="component" href="/event/faces/a4j/s/3_3_3.Finalcss/table.xcss/DATB/eAEz2rRkV-jyGdIAEoQD8g__" rel="stylesheet" type="text/css" /><script src="/event/jslibrary/1309972098000/JiffyStubs.js" type="text/javascript"></script><script src="/event/static/121310/js/functions.js" type="text/javascript"></script><script src="/event/jslibrary/1312410408000/main.js" type="text/javascript"></script><script src="/event/jslibrary/labels/1312410408000/en_US.js" type="text/javascript"></script><script src="/event/static/121310/desktop/desktopAjax.js" type="text/javascript"></script><script src="/event/static/121310/js/picklist.js" type="text/javascript"></script></head><script>
   
    function validate(){
  var flag = true;
  var container = document.getElementById("inputContainer");
  var ckbxContainer = document.getElementById("checkboxContainer");
  var firstnameErrMsg = document.getElementById('fnameErrMsg');
  var lastnameErrMsg = document.getElementById('lnameErrMsg');
  var emailErrMsg = document.getElementById('emailErrMsg');
  var checkboxErrMsg = document.getElementById('ckbxErrMsg');
  var inputs = container.getElementsByTagName("input");
  var checkboxes = ckbxContainer.getElementsByTagName("input");
  var isSelected = false;
  
  for (var i = 0; i < checkboxes.length; i++){
   if (checkboxes[i].type == "checkbox") {
    if (checkboxes[i].checked == true) {
     isSelected = true;
    }
   }
  }
  
  for(var i = 0; i < inputs.length; i++){
   var str = inputs[i].name;
   if (str.indexOf('fname') != -1) {
    if (inputs[i].value == "") {
     firstnameErrMsg.style.display='block';
              flag = false;
    } 
    else {
     firstnameErrMsg.style.display='none';
    }  
   }
   if (str.indexOf('lname') != -1) {
    if (inputs[i].value == "") {
     lastnameErrMsg.style.display='block';
              flag = false;
    } 
    else {
     lastnameErrMsg.style.display='none';
    }  
   }
   if (str.indexOf('email') != -1) {
    if (inputs[i].value == "") {
     emailErrMsg.style.display='block';
              flag = false;
    }
              else {
                 emailErrMsg.style.display='none';
              }   
   }
   if (!isSelected) {
    checkboxErrMsg.style.display='block';
    flag = false;
   }
   else {
    checkboxErrMsg.style.display='none';
   }
  } 
  if(flag == false){
   return flag;
  }else{
   return flag;
  }
 }

    </script>
<form id="j_id0:j_id2" name="j_id0:j_id2" method="post" action="/event/vfEventRegister" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="j_id0:j_id2" value="j_id0:j_id2" />
<a href="/event">Return to event listing</a>
		<h1>Register Online</h1>

		<p>
		Please fill out the following information to register for<label>
Test Event 3</label> on 10/03/2011.
		</p> 
		<div id="inputContainer"><table>
<tbody>
<tr>
<td><label>
First Name</label></td>
<td>
				<span id="fnameErrMsg" style="color:red;display:none;font-weight:bold;float:right;">Error: First Name is Required</span><input id="j_id0:j_id2:fname" type="text" name="j_id0:j_id2:fname" /></td>

</tr>
<tr>
<td><label>
Last Name</label></td>
<td>
				<span id="lnameErrMsg" style="color:red;display:none;font-weight:bold;float:right;">Error: Last Name is Required</span><input id="j_id0:j_id2:lname" type="text" name="j_id0:j_id2:lname" /></td>
</tr>
<tr>
<td><label>
Email Address</label></td>
<td>
				<span id="emailErrMsg" style="color:red;display:none;font-weight:bold;float:right;">Error: A Valid Email Address is Required</span><input id="j_id0:j_id2:email" type="text" name="j_id0:j_id2:email" /></td>

</tr>
</tbody>
</table>

		</div>
		<div id="checkboxContainer"><script  type="text/javascript"> if(!window.sfdcPage){window.sfdcPage = new ApexPage();}
UserContext.initialize({"locale":"en_US","timeFormat":"h:mm a","today":"8/4/2011 2:26 PM","userPreferences":[{"index":112,"name":"HideInlineEditSplash","value":false},{"index":114,"name":"OverrideTaskSendNotification","value":false},{"index":115,"name":"DefaultTaskSendNotification","value":false},{"index":119,"name":"HideUserLayoutStdFieldInfo","value":false},{"index":116,"name":"HideRPPWarning","value":false},{"index":87,"name":"HideInlineSchedulingSplash","value":false},{"index":88,"name":"HideCRUCNotification","value":false},{"index":89,"name":"HideNewPLESplash","value":false},{"index":90,"name":"HideNewPLEWarnIE6","value":false},{"index":122,"name":"HideOverrideSharingMessage","value":false},{"index":91,"name":"HideProfileILEWarn","value":false},{"index":93,"name":"HideProfileElvVideo","value":false},{"index":97,"name":"ShowPicklistEditSplash","value":false},{"index":92,"name":"HideDataCategorySplash","value":false},{"index":128,"name":"ShowDealView","value":false},{"index":129,"name":"HideDealViewGuidedTour","value":false},{"index":132,"name":"HideKnowledgeFirstTimeSetupMsg","value":false},{"index":104,"name":"DefaultOffEntityPermsMsg","value":false},{"index":133,"name":"HideCSNWelcomeMessage","value":false},{"index":135,"name":"HideNewCsnSplash","value":false},{"index":101,"name":"HideBrowserWarning","value":false},{"index":139,"name":"HideDashboardBuilderGuidedTour","value":false},{"index":140,"name":"HideSchedulingGuidedTour","value":false},{"index":180,"name":"HideReportBuilderGuidedTour","value":false},{"index":183,"name":"HideAssociationQueueCallout","value":false},{"index":194,"name":"HideQTEBanner","value":false},{"index":193,"name":"HideChatterOnboardingSplash","value":false},{"index":195,"name":"HideSecondChatterOnboardingSplash","value":false},{"index":196,"name":"HideCSIGuidedTour","value":false},{"index":205,"name":"HideApexTestGuidedTour","value":false},{"index":206,"name":"HideSetupProfileHeaderTour","value":false},{"index":207,"name":"HideSetupProfileObjectsAndTabsTour","value":false},{"index":210,"name":"ShowContentUpdateAlert","value":false},{"index":213,"name":"DefaultOffArticleTypeEntityPermMsg","value":false},{"index":214,"name":"HideSelfInfluenceGetStarted","value":false},{"index":215,"name":"HideOtherInfluenceGetStarted","value":false},{"index":216,"name":"HideFeedToggleGuidedTour","value":false},{"index":218,"name":"HideDirectMessagesCallout","value":false}],"startOfWeek":"1","isAccessibleMode":false,"ampm":["AM","PM"],"userId":"005E0000000EVem","dateTimeFormat":"M/d/yyyy h:mm a","dateFormat":"M/d/yyyy","uiSkin":"Theme3","language":"en_US","siteUrlPrefix":"/event"});
</script><div class="apexp"><div id="j_id0:j_id2:j_id21" class="bPageBlock apexDefaultPageBlock secondaryPalette"><div class="pbBody"><table class="list " id="j_id0:j_id2:j_id21:j_id22" border="0" cellpadding="5" cellspacing="0"><colgroup span="4"></colgroup><thead class="rich-table-thead"><tr class="headerRow "><th class="headerRow  " scope="col" colspan="1" id="j_id0:j_id2:j_id21:j_id22:j_id23header"><div id="j_id0:j_id2:j_id21:j_id22:j_id23header:sortDiv"></div></th><th class="headerRow  " scope="col" colspan="1" id="j_id0:j_id2:j_id21:j_id22:j_id25header"><div id="j_id0:j_id2:j_id21:j_id22:j_id25header:sortDiv"></div></th><th class="headerRow  " scope="col" colspan="1" id="j_id0:j_id2:j_id21:j_id22:j_id27header"><div id="j_id0:j_id2:j_id21:j_id22:j_id27header:sortDiv"></div></th><th class="headerRow  " scope="col" colspan="1" id="j_id0:j_id2:j_id21:j_id22:j_id30header"><div id="j_id0:j_id2:j_id21:j_id22:j_id30header:sortDiv"></div></th></tr></thead><tbody id="j_id0:j_id2:j_id21:j_id22:tb"><tr class="dataRow even  first " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:0:j_id23" colspan="1"><input type="checkbox" name="j_id0:j_id2:j_id21:j_id22:0:j_id24" /></td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:0:j_id25" colspan="1">Session 1</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:0:j_id27" colspan="1">8:00 AM</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:0:j_id30" colspan="1">-&nbsp;&nbsp;9:30 AM</td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:1:j_id23" colspan="1"><input type="checkbox" name="j_id0:j_id2:j_id21:j_id22:1:j_id24" /></td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:1:j_id25" colspan="1">Session 2</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:1:j_id27" colspan="1">10:00 AM</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:1:j_id30" colspan="1">-&nbsp;&nbsp;12:00 AM</td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:2:j_id23" colspan="1"><input type="checkbox" name="j_id0:j_id2:j_id21:j_id22:2:j_id24" /></td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:2:j_id25" colspan="1">Session 3</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:2:j_id27" colspan="1">1:00 PM</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:2:j_id30" colspan="1">-&nbsp;&nbsp;3:00 PM</td></tr><tr class=" dataRow odd  last " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:3:j_id23" colspan="1"><input type="checkbox" name="j_id0:j_id2:j_id21:j_id22:3:j_id24" /></td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:3:j_id25" colspan="1">Session 4</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:3:j_id27" colspan="1">3:30 PM</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:3:j_id30" colspan="1">-&nbsp;&nbsp;5:00 PM</td></tr></tbody></table></div><div class="pbFooter secondaryPalette"><div class="bg"></div></div></div></div>

		</div>
		<span id="ckbxErrMsg" style="color:red;display:none;font-weight:bold;float:left;">Error: You Must Select At Least One Session.</span>
		<div style="clear:both;"></div><table>
<tbody>
<tr>
<td><input type="submit" name="j_id0:j_id2:j_id36" value="Register" onclick="return validate();" /></td>
</tr>
</tbody>
</table>
<div id="j_id0:j_id2:j_id37"></div><input type="hidden"  id="com.salesforce.visualforce.ViewState" name="com.salesforce.visualforce.ViewState" value="SlOXJBA3fQVAOf8g8p6Ks0BhdDvrqdw97LbtE/t02VJtayLsXS01+IgVH7GxqceWVGoR/uHjshvhFuKsGyMkyw+e0ft/Sj5aKbz4XlBU+qSVQLs7WpQq5Qzu3/N6bYnay0rElixKaVb/XYgZYl0H63mCejdXrjZD7v9ZqmnnLmT4XlcAbLW5oU6BEW5rZ5ACVYEFjupg5fM2xSp7f5oaM2H+sTRHeHyizw2W2XpogdyvyyZKCmGtUP1gU8YX31K3lC37D+XO2bssoiw2aurMYHC3c8dFBaePu+I7Hhj3f90SANycUlycBX/juGDhvTqwANlgt9dHGM6cLY4dgBczohCxkxsHwD1g5nOrhQbsQg59i5J6W5j6pRaVCksvvXkbdAv+oQkVc6t/Y6ESG9V17hbK2ug4WFyvPEgKMqdkL1AesgX6HM2au17fFL5pS6eHmeZna+4F5bzrSebThRkKxAFR//ePbbgcPAzog5esY86kwOhMSuDW5LUNeZQt2NB/JORrHY7NANrwrVSFJmqUERBsknw6Qjb8xD4yNd5qYlbQctDyohnyjwkU8VdbIZtHBN4/llo1xG6mW6UnQxDXXsv3n6g++JXNGISVLLmDjsJnKak/hAptfEQi7SQRWI46ditSpqMuFLLEK9Yf80Ln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tOkBOzHinROppd3Bm9rQ/QjWxk/aNqT2rX1+23bxcebyIhXop4D4SkEbbx6z9jzq9T6rNNgjDYWGkMmxklvCf7PyFIZvH+N2i1m1/vhP+S0FlMmjZqokkPMFUC7e84I0+94eH8vOJ11OWYR7t3lp0tcEO3tVjKwlrtxJHqZmN4Uc8ag5nqs93bGRWCotomlQxG7NouMT08zGuF+ul0mDwVofVhLTjqZt4RbSUlOcaC8bsTJZlcM2yRp34DgmrFLWEdxrlBbzIulJcf7i8FM0CRYEfof+J2Cx/CMu+qGaH0Vjc7Tj8de1JKW1zUPYzwEI/hggdb/nXqdb2VFDgXZIINZhvmH2PEKeClE6D7huRUb6hU0ZYO0Qmk5YSa8LW3pSqvNczpLXj9BKOab1ui2BvR/hN9P+PQezmuh/U/SYEwcmFrsllm5+7doBAPKES/dU4yn07uIVTlY+qs5ufhDaA9tVWqclYrAwMrMx6wJjugFJh3S6cjLxRJKDyLWPlq/d+UR3jwmfmQVOGsq5uWZ5Bq29d42ez1h+joe8XNYdwKuuMJsJ++boZB8Wx6slcNILPYGAGHXl7mx7ZxFOfHFqLRqa4WDM+WrEhoolMGZeEb+pXgBdKi5dwhaZ4gvWqZ4eEfbp0hML4D1Kyj685OQoxixaPSyXlb5LSXEYpaef26hQuNSvK6MeykJsE=" /><input type="hidden"  id="com.salesforce.visualforce.ViewStateMAC" name="com.salesforce.visualforce.ViewStateMAC" value="AJ5qyYQ4jYv147HO3gYOmxSlNO/Z" />
</form></html>

Open in new window

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

	<html><head><link class="component" href="/event/faces/a4j/s/3_3_3.Finalcss/table.xcss/DATB/eAEz2rRkV-jyGdIAEoQD8g__" rel="stylesheet" type="text/css" /><script src="/event/jslibrary/1309972098000/JiffyStubs.js" type="text/javascript"></script><script src="/event/static/121310/js/functions.js" type="text/javascript"></script><script src="/event/jslibrary/1312410408000/main.js" type="text/javascript"></script><script src="/event/jslibrary/labels/1312410408000/en_US.js" type="text/javascript"></script><script src="/event/static/121310/desktop/desktopAjax.js" type="text/javascript"></script><script src="/event/static/121310/js/picklist.js" type="text/javascript"></script></head><script>
   
 function checkemail(email){
    var filter = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
    return filter.test(email);
 }

 function validate(){
  var flag = true;
  var container = document.getElementById("inputContainer");
  var ckbxContainer = document.getElementById("checkboxContainer");
  var firstnameErrMsg = document.getElementById('fnameErrMsg');
  var lastnameErrMsg = document.getElementById('lnameErrMsg');
  var emailErrMsg = document.getElementById('emailErrMsg');
  var checkboxErrMsg = document.getElementById('ckbxErrMsg');
  var inputs = container.getElementsByTagName("input");
  var checkboxes = ckbxContainer.getElementsByTagName("input");
  var isSelected = false;
  
  for (var i = 0; i < checkboxes.length; i++){
   if (checkboxes[i].type == "checkbox") {
    if (checkboxes[i].checked == true) {
     isSelected = true; 
     break;
    }
   }
  }
  
  for(var i = 0; i < inputs.length; i++){
   var str = inputs[i].name;
   if (str.indexOf('fname') != -1) {
    if (inputs[i].value == "") {
     firstnameErrMsg.style.display='block';
          flag = false;
    } 
    else {
     firstnameErrMsg.style.display='none';
    }  
   }

   if (str.indexOf('lname') != -1) {
    if (inputs[i].value == "") {
     lastnameErrMsg.style.display='block';
              flag = false;
    } 
    else {
     lastnameErrMsg.style.display='none';
    }  
   }

   if (str.indexOf('email') != -1) {
    if (inputs[i].value == "") {
     emailErrMsg.style.display='block';
              flag = false;
    }
              else if (inputs[i].value != "") {
              if (!checkemail(inputs[i])) {
                  emailErrMsg.style.display='block';
                  flag = false;
               } 
               else {
                  emailErrMsg.style.display='none';
               } 
    }   
   }

   if (!isSelected) {
    checkboxErrMsg.style.display='block';
    flag = false;
   }
   else {
    checkboxErrMsg.style.display='none';
   }
  } 

  return flag;
 }

    </script>
<form id="j_id0:j_id2" name="j_id0:j_id2" method="post" action="/event/vfEventRegister" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="j_id0:j_id2" value="j_id0:j_id2" />
<a href="/event">Return to event listing</a>
		<h1>Register Online</h1>

		<p>
		Please fill out the following information to register for<label>
Test Event 3</label> on 10/03/2011.
		</p> 
		<div id="inputContainer"><table>
<tbody>
<tr>
<td><label>
First Name</label></td>
<td>
				<span id="fnameErrMsg" style="color:red;display:none;font-weight:bold;float:right;">Error: First Name is Required</span><input id="j_id0:j_id2:fname" type="text" name="j_id0:j_id2:fname" /></td>

</tr>
<tr>
<td><label>
Last Name</label></td>
<td>
				<span id="lnameErrMsg" style="color:red;display:none;font-weight:bold;float:right;">Error: Last Name is Required</span><input id="j_id0:j_id2:lname" type="text" name="j_id0:j_id2:lname" /></td>
</tr>
<tr>
<td><label>
Email Address</label></td>
<td>
				<span id="emailErrMsg" style="color:red;display:none;font-weight:bold;float:right;">Error: A Valid Email Address is Required</span><input id="j_id0:j_id2:email" type="text" name="j_id0:j_id2:email" /></td>

</tr>
</tbody>
</table>

		</div>
		<div id="checkboxContainer"><script  type="text/javascript"> if(!window.sfdcPage){window.sfdcPage = new ApexPage();}
UserContext.initialize({"locale":"en_US","timeFormat":"h:mm a","today":"8/4/2011 2:05 PM","userPreferences":[{"index":112,"name":"HideInlineEditSplash","value":false},{"index":114,"name":"OverrideTaskSendNotification","value":false},{"index":115,"name":"DefaultTaskSendNotification","value":false},{"index":119,"name":"HideUserLayoutStdFieldInfo","value":false},{"index":116,"name":"HideRPPWarning","value":false},{"index":87,"name":"HideInlineSchedulingSplash","value":false},{"index":88,"name":"HideCRUCNotification","value":false},{"index":89,"name":"HideNewPLESplash","value":false},{"index":90,"name":"HideNewPLEWarnIE6","value":false},{"index":122,"name":"HideOverrideSharingMessage","value":false},{"index":91,"name":"HideProfileILEWarn","value":false},{"index":93,"name":"HideProfileElvVideo","value":false},{"index":97,"name":"ShowPicklistEditSplash","value":false},{"index":92,"name":"HideDataCategorySplash","value":false},{"index":128,"name":"ShowDealView","value":false},{"index":129,"name":"HideDealViewGuidedTour","value":false},{"index":132,"name":"HideKnowledgeFirstTimeSetupMsg","value":false},{"index":104,"name":"DefaultOffEntityPermsMsg","value":false},{"index":133,"name":"HideCSNWelcomeMessage","value":false},{"index":135,"name":"HideNewCsnSplash","value":false},{"index":101,"name":"HideBrowserWarning","value":false},{"index":139,"name":"HideDashboardBuilderGuidedTour","value":false},{"index":140,"name":"HideSchedulingGuidedTour","value":false},{"index":180,"name":"HideReportBuilderGuidedTour","value":false},{"index":183,"name":"HideAssociationQueueCallout","value":false},{"index":194,"name":"HideQTEBanner","value":false},{"index":193,"name":"HideChatterOnboardingSplash","value":false},{"index":195,"name":"HideSecondChatterOnboardingSplash","value":false},{"index":196,"name":"HideCSIGuidedTour","value":false},{"index":205,"name":"HideApexTestGuidedTour","value":false},{"index":206,"name":"HideSetupProfileHeaderTour","value":false},{"index":207,"name":"HideSetupProfileObjectsAndTabsTour","value":false},{"index":210,"name":"ShowContentUpdateAlert","value":false},{"index":213,"name":"DefaultOffArticleTypeEntityPermMsg","value":false},{"index":214,"name":"HideSelfInfluenceGetStarted","value":false},{"index":215,"name":"HideOtherInfluenceGetStarted","value":false},{"index":216,"name":"HideFeedToggleGuidedTour","value":false},{"index":218,"name":"HideDirectMessagesCallout","value":false}],"startOfWeek":"1","isAccessibleMode":false,"ampm":["AM","PM"],"userId":"005E0000000EVem","dateTimeFormat":"M/d/yyyy h:mm a","dateFormat":"M/d/yyyy","uiSkin":"Theme3","language":"en_US","siteUrlPrefix":"/event"});
</script><div class="apexp"><div id="j_id0:j_id2:j_id21" class="bPageBlock apexDefaultPageBlock secondaryPalette"><div class="pbBody"><table class="list " id="j_id0:j_id2:j_id21:j_id22" border="0" cellpadding="5" cellspacing="0"><colgroup span="4"></colgroup><thead class="rich-table-thead"><tr class="headerRow "><th class="headerRow  " scope="col" colspan="1" id="j_id0:j_id2:j_id21:j_id22:j_id23header"><div id="j_id0:j_id2:j_id21:j_id22:j_id23header:sortDiv"></div></th><th class="headerRow  " scope="col" colspan="1" id="j_id0:j_id2:j_id21:j_id22:j_id25header"><div id="j_id0:j_id2:j_id21:j_id22:j_id25header:sortDiv"></div></th><th class="headerRow  " scope="col" colspan="1" id="j_id0:j_id2:j_id21:j_id22:j_id27header"><div id="j_id0:j_id2:j_id21:j_id22:j_id27header:sortDiv"></div></th><th class="headerRow  " scope="col" colspan="1" id="j_id0:j_id2:j_id21:j_id22:j_id30header"><div id="j_id0:j_id2:j_id21:j_id22:j_id30header:sortDiv"></div></th></tr></thead><tbody id="j_id0:j_id2:j_id21:j_id22:tb"><tr class="dataRow even  first " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:0:j_id23" colspan="1"><input type="checkbox" name="j_id0:j_id2:j_id21:j_id22:0:j_id24" /></td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:0:j_id25" colspan="1">Session 1</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:0:j_id27" colspan="1">8:00 AM</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:0:j_id30" colspan="1">-&nbsp;&nbsp;9:30 AM</td></tr><tr class=" dataRow odd " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:1:j_id23" colspan="1"><input type="checkbox" name="j_id0:j_id2:j_id21:j_id22:1:j_id24" /></td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:1:j_id25" colspan="1">Session 2</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:1:j_id27" colspan="1">10:00 AM</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:1:j_id30" colspan="1">-&nbsp;&nbsp;12:00 AM</td></tr><tr class="dataRow even " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:2:j_id23" colspan="1"><input type="checkbox" name="j_id0:j_id2:j_id21:j_id22:2:j_id24" /></td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:2:j_id25" colspan="1">Session 3</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:2:j_id27" colspan="1">1:00 PM</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:2:j_id30" colspan="1">-&nbsp;&nbsp;3:00 PM</td></tr><tr class=" dataRow odd  last " onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onBlur="if (window.hiOff){hiOff(this);}" onFocus="if (window.hiOn){hiOn(this);}"><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:3:j_id23" colspan="1"><input type="checkbox" name="j_id0:j_id2:j_id21:j_id22:3:j_id24" /></td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:3:j_id25" colspan="1">Session 4</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:3:j_id27" colspan="1">3:30 PM</td><td class="dataCell  " id="j_id0:j_id2:j_id21:j_id22:3:j_id30" colspan="1">-&nbsp;&nbsp;5:00 PM</td></tr></tbody></table></div><div class="pbFooter secondaryPalette"><div class="bg"></div></div></div></div>

		</div>
		<span id="ckbxErrMsg" style="color:red;display:none;font-weight:bold;float:left;">Error: You Must Select At Least One Session.</span>
		<div style="clear:both;"></div><table>
<tbody>
<tr>
<td><input type="submit" name="j_id0:j_id2:j_id36" value="Register" onclick="return validate();" /></td>
</tr>
</tbody>
</table>
<div id="j_id0:j_id2:j_id37"></div><input type="hidden"  id="com.salesforce.visualforce.ViewState" name="com.salesforce.visualforce.ViewState" value="mRIPAya8DOqGrj5DTigffWuuT0hqha8YUGeSv79Y6rmNSpkf8tNZWUSEZKQULmIpWuz7CMQghQTXq/4+bT4Uo8uzOUxXUo2eS8hLtLxkB9D1uHSwBlQXcAflTVAaXl3vABfif6SdZyO1q07oL4q/PfYiSU1eEaWCj9A3Kjsp6nB+0MUYLzSMELTRZOv/V7zP7cOVkcNnWyD2I9KwXMQ9GvdtEs0FfMSnln8w+8e5DPFak32MGVpz3a2zKbUFHxgFAr5+Rk7w84IMkmRAumSg3bPWEko6jucn5QGRTYm5VYJLcpzPdw4Io+9KyO9a3ddtPcPzWb6tR2SAhw74cllprfgtazPBEXJA3jL4kOuSmGWyVIdeMQCrWpWvhXLCsP7JAsr7JWfq4DXDd1jFErQWK4wKOEOuHMmE4+mEWjXV01XihalOT6wuxzjgijr99JrCLMl8Fpx0SL53P50bCdDeIfICaMUlTJenouuoak9HNIgARrEKyyPF3MomvErflq7RiVeX8HjOemSjUywYUxe93HUA+/lq83kWr7DJhakhe4Eu2HnNofQYknJZ4FTolfs8f87Wucg+ni9cHB8pQsqvYpA1E3rkVKUilMXCqeYKguqT+ZuEwpIjkcuRBfAFk9fJ24BXKwSrz/v+r56zfVUdDLRUKEUStburqEk643wsUiPs/EtJU8hWPfcjIpg62wI4qYFJOjbevEw8QHNdMy65L6t3388RJZwi/ZLPFZXelZyLlwz/H8jXZ6QJACFY6GmFkNhHbyjAil8J8pxgE2KOuDhmsRER3NRC3xbkm3qAsAsg3z+fwj3oT7MC366wPuGeDcxeIsks69qdpjhRI9n8kBLi8UjvnSPsDs5kL/f7uT7tmPQSgjXitGQlpm3EH/PEwXUB1GomickkM6sctKwtzlEbr1vDFce6EGzs+NQBdzou37yR7rQEcKUvNaE8Xk9PjMsJE9gu3uk8ammmdjwyeKxTCe1pNz9UEo8M+tCXrZvXZ7Fm+48IAWiqDuqKIva7EFhLGZsnTOftp5GqWf9PFNU11yVMKQVEQlSHF3o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jpKCi3Vmj4Dv575TDbZWF2yfztV2XfPau7sTpHdtc+XEUYAbJdFQ9VC0r0rRJarr8/cQoBHQ709bmaQSCalF6q3BqegG7MEjUn7MXJsmRZEN71oL/0erGhW2EspYiZvgR3CnH3OBb15PIZbLpk5rmbZFhqqUMuy4//qGMU2Xt0rF0ouubCJFUAf8lTXEknIV4CgmzZEPWO72mSgL/0CBl1elp0dHwaHs+ed7GzjVtW1h6KUizSaXUmI+7tB96+yiC+Nd7/z9uvINdUij3Ri58USx5EgnWbE0bpx0vxLQ5+Jfbp4ZpOcTt3Z7g==" /><input type="hidden"  id="com.salesforce.visualforce.ViewStateMAC" name="com.salesforce.visualforce.ViewStateMAC" value="AE6MzsD532ZMxpJNKTKnk3HTP9Ek" />
</form></html>

Open in new window

Sr. System Analyst
Commented:
Line 59:


if (!checkemail(inputs[i])) {
-->
if (!checkemail(inputs[i].value)) {

Open in new window

HainKurtSr. System Analyst

Commented:
also dont need to check for non emty in your code...

below code should be sufficient (Line 58)
else if (inputs[i].value != "") 
-->
else

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial