I get nameSPAN1 is undefined when I place cursor in comments box..
<%@ LANGUAGE="VBScr ipt" %>
<% DIM ipAddress
ipAddress=Reque st.Servervariab les("REMOTE_HOS T")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<script>
<!--
function submit_rcd()
{
document.form1. action = "webmail_send.a sp";
document.form1. submit();
}
function cancel_cmd()
{ window.close()
}
function validField() // !!!THIS IS WHERE PROBLEM EXISTS!!!!
{
if (document.formD oubleMenuDMA.st rSubject.value == "")
{ nameSPAN1.inner HTML = "Please select a subject";
nameSPAN1.style .color='#FF0000 ';
alert("Please Enter A Subject");
return false; }
else
{ nameSPAN1.inner HTML = "";
return true; }
}
function validField2()
{ nameSPAN2.inner HTML = "Please type a valid email<br>";
nameSPAN2.style .color='#FF0000 ';
}
function validField3()
{ nameSPAN2.inner HTML = "Valid Email! Thankyou for your
cooperation!<br >";
nameSPAN2.style .color='#00CD66 ';
}
function checkEmail(strF romAddress){ //reference to email field passed
as argument
var fieldValue = strFromAddress. value // store field's entire value in
variable
// Begin Valid Email Address Tests
//if field is not empty
if(fieldValue != ""){
var atSymbol = 0
//loop through field value string
for(var a = 0; a < fieldValue.leng th; a++){
//look for @ symbol and for each @ found, increment atSymbol variable
by 1
if(fieldValue.c harAt(a) == "@"){
atSymbol++
}
}
// if more than 1 @ symbol exists
if(atSymbol > 1){
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
// if 1 @ symbol was found, and it is not the 1st character in string
if(atSymbol == 1 && fieldValue.char At(0) != "@"){
//look for period at 2nd character after @ symbol
var period = fieldValue.inde xOf(".",fieldVa lue.indexOf("@" )+2)
// "." immediately following 1st "." ?
var twoPeriods = (fieldValue.cha rAt((period+1)) == ".") ? true : false
//if period was not found OR 2 periods together OR field contains less
than 5 characters OR period is in last position
if(period == -1 || twoPeriods || fieldValue.leng th < period + 2 ||
fieldValue.char At(fieldValue.l ength-1)=="."){
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
}
// no @ symbol exists or it is in position 0 (the first character of
the field)
else{
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
}
// if field is empty
else{
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
//all tests passed, submit form
//alert("VALID EMAIL ADDRESS!")
validField3()
return true
}
//-->
//-->
</script>
<title>Email Departments</title>
<script language="javas cript">
<!--//
//new Option("text"," value")
//this code changes menus
function nullOptionsDMA( aMenu){
var tot=aMenu.optio ns.length
for (i=0;i<tot;i++)
{
aMenu.options[i]=null
}
aMenu.options.l ength=0;
}
function MySubjectDMA0(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a subject","");
options[1]=new Option("Address ing","Addressin g");
options[2]=new Option("Questio ns","Questions" );
options[3]=new Option("Complai nts","Complaint s");
options[4]=new Option("Comment s","Comments ");
options[5]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA1(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a subject","none" );
options[1]=new Option("Adoptio ns","Adoptions" );
options[2]=new Option("Lost Pets","Lost Pets");
options[3]=new Option("Found Pets","Found Pets");
options[4]=new Option("Licensi ng","Licensing" );
options[5]=new Option("Neuter Commuter","Neut er Commuter");
options[6]=new Option("Microch ips","Microchip s");
options[7]=new Option("Address Updates","Addre ss Updates");
options[8]=new Option("Volunte er Info","Voluntee r Info");
options[9]=new Option("Foster Info","Foster Info");
options[9]=new Option("Communi ty Service Info","Communit y Service
Info");
options[10]=new Option("General ","General" );
options[0].selected=true
}
}
function MySubjectDMA2(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a subject","none" );
options[1]=new Option("Contrac tor Complaints","Co ntractor Complaints");
options[2]=new Option("Non-Permit Work","Non-Permit Work");
options[3]=new Option("Complai nt about Inspecation Result","Compla int
about Inspecation Result");
options[4]=new Option("Informa tion about Permitting Process
","Informat ion about Permitting Process");
options[5]=new Option("Permit Status Request","Permi t Status Request");
options[6]=new Option("Permit Form Request","Permi t Form Request");
options[7]=new Option("Non-Permit Work","Non-Permit Work");
options[8]=new Option("Can I build on my property?","Can I build on my
property?");
options[9]=new Option("Request for Contractor Newsletter via Email
","Request for Contractor Newsletter via Email");
options[10]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA3(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Animal Control","Anima l Control");
options[2]=new Option("Animal Cruelty","Anima l Cruelty");
options[3]=new Option("Litteri ng","Littering" );
options[4]=new Option("Junk and Unserviceable Vehicles","Junk and
Unserviceable Vehicles");
options[5]=new Option("Noise", "Noise");
options[6]=new Option("Zoning Issues","Zoning Issues");
options[7]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA4(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("CDBG Inquiries","CDB G Inquiries");
options[2]=new Option("Ship Program","Ship Program");
options[3]=new Option("Housing Assistance","Ho using Assistance");
options[4]=new Option("Housing Loans","Housing Loans");
options[5]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA5(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA6(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA7(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA8(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA9(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA10( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Park Fees","Park Fees");
options[2]=new Option("Park Inquiry","Park Inquiry");
options[3]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA11( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Plannin g Inquiries","Pla nning Inquiries");
options[2]=new Option("Transpo rtation Inquiries","Tra nsportation
Inquiries");
options[3]=new Option("Transpo rtation Impact Fees","Transpor tation
Impact Fees");
options[4]=new Option("Fire Impact Fees","Fire Impact Fees");
options[5]=new Option("Propert y Access-Easements","Pro perty
Access-Easements");
options[6]=new Option("Surplus Land Sales","Surplus Land Sales");
options[7]=new Option("Plat Vacations","Pla t Vacations");
options[8]=new Option("Road Closings","Road Closings");
options[9]=new Option("Scenic Roads","Scenic Roads");
options[10]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA12( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA13( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Right of Way Permits","Right of Way Permits");
options[3]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA14( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA15( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA16( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA16( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Roadway Project Inquiries","Roa dway Project
Inquiries");
options[2]=new Option("Speed Limit Inquiries","Spe ed Limit Inquiries");
options[3]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA17( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA18( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA19( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA20( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA21( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA22( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
/* ############### ######## goDM() ############### ######## */
function goDMA(aMenu){
if (aMenu.options. value!="none")
{
location=aMenu. options[aMenu.selectedI ndex].value
}
}
/* ############### ######## setUp ############### ######## */
function setUpDMA(){
with (document.formD oubleMenuDMA) {
if (strDept.select edIndex==0){
strDept.options[0].selected=true
strSubject.opti ons[0].selected=true
}
if (strDept.select edIndex==1)
MySubjectDMA0(s trSubject)
if (strDept.select edIndex==2)
MySubjectDMA1(s trSubject)
if (strDept.select edIndex==3)
MySubjectDMA2(s trSubject)
if (strDept.select edIndex==4)
MySubjectDMA3(s trSubject)
if (strDept.select edIndex==5)
MySubjectDMA4(s trSubject)
if (strDept.select edIndex==6)
MySubjectDMA5(s trSubject)
if (strDept.select edIndex==7)
MySubjectDMA6(s trSubject)
if (strDept.select edIndex==8)
MySubjectDMA7(s trSubject)
if (strDept.select edIndex==9)
MySubjectDMA8(s trSubject)
if (strDept.select edIndex==10)
MySubjectDMA9(s trSubject)
if (strDept.select edIndex==11)
MySubjectDMA10( strSubject)
if (strDept.select edIndex==12)
MySubjectDMA11( strSubject)
if (strDept.select edIndex==13)
MySubjectDMA12( strSubject)
if (strDept.select edIndex==14)
MySubjectDMA13( strSubject)
if (strDept.select edIndex==15)
MySubjectDMA14( strSubject)
if (strDept.select edIndex==16)
MySubjectDMA15( strSubject)
if (strDept.select edIndex==17)
MySubjectDMA16( strSubject)
}
}
/* ############### ######## changeFiles ############### ######## */
function changeFilesDMA( ){
aMenu=document. formDoubleMenuD MA.strDept
aMenu2=document .formDoubleMenu DMA.strSubject
with (aMenu){
switch (selectedIndex) {
case 0:
aMenu2.options. length=0;
aMenu2.options[0]=
new Option("Pages appear here","none")
aMenu2.options[0].selected=true;
history.go(0)
break
case 1:
MySubjectDMA0(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 2:
MySubjectDMA1(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 3:
MySubjectDMA2(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 4:
MySubjectDMA3(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 5:
MySubjectDMA4(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 6:
MySubjectDMA5(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 7:
MySubjectDMA6(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 8:
MySubjectDMA7(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 9:
MySubjectDMA8(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 10:
MySubjectDMA9(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 11:
MySubjectDMA10( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 12:
MySubjectDMA11( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 13:
MySubjectDMA12( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 14:
MySubjectDMA13( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 15:
MySubjectDMA14( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 16:
MySubjectDMA15( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 17:
MySubjectDMA16( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 18:
MySubjectDMA17( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
}
}
}
//-->
</script>
<meta name="Microsoft Theme" content="intern et 011, default">
<meta name="Microsoft Border" content="t">
</head>
<body onLoad="setUpDM A()">
<FORM name="formDoubl eMenuDMA" method="post"
action="../department_form s/webmail_send.as p">
<input type="hidden" name="ipAddress "
value="<%Respon se.Write(ipAddr ess)%>">
<table border="0" cellpadding="0" style="border-collapse:
collapse" width="66%" id="table2">
<tr>
<td>
<u><b><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Email Your
Comments or Complaints<br>
</font></b></u><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">You can
use this form to email your comments or notify the County of a
complaint which you may have. Select the department and subject from
the drop down menus provided to help us route your email to the
proper County office. Please enter a valid email address. If you
wish to be contacted other than by email, please include your
address and phone number in the comment area.</font></td>
</tr>
</table>
<p align="left">
<b>
<TABLE width="543" border="0" id="table1">
<TR>
<TD width="179" valign="middle" >
<DIV align="right">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Your
email
address: </font> </DIV>
</TD>
<TD width="354">
<INPUT type="text" name="strFromAd dress"
onblur="checkEm ail(strFromAddr ess)" size="40" tabindex="1"><b r>
<span ID="nameSPAN2"
style="font-size:8pt;font-face:verdana"></span></TD>
</TR>
<TR>
<TD width="179" valign="middle" >
<DIV align="right">
<font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Depart ment
to Contact: </font></DIV>
</TD>
<TD width="354">
<select name="strDept" onChange="chang eFilesDMA()">
<option value="none" >Select a department
<option value="911 Management"> 911 Management</option>
<option value="Animal Center"> Animal Center</option>
<option value="Building "> Building Dept</option>
<option value="Code Enforcement"> Code Enforcement</option>
<option value="Communit y Services"> Community Services</option>
<option value="Developm ent Review"> Engineering</option>
<option value="Drainage "> Engineering</option>
<option value="Fleet"> Fleet Management</option>
<option value="GIS"> GIS</option>
<option value="Master Gardener"> Master Gardener</option>
<option value="Parks and Recreation"> Parks and Recreation</option>
<option value="Planning "> Planning Department</option>
<option value="Public Affairs"> Public Affairs</option>
<option value="Right of Way"> Right of Way</option>
<option value="Roads"> Road Department</option>
<option value="Solid Waste"> Solid Waste</option>
<option value="Survey"> Survey</option>
<option value="Transpor tation"> Transportation</option>
<option value="Traffic" > Traffic</option>
<option value="Utilitie s"> Utilities</option>
<option value="VA"> Veterans Affairs</option>
<option value="VetPark" > Veterans Park</option>
<option value="Zoning"> Zoning Department</option>
</select></TD>
</TR>
<TR>
<TD width="179" valign="middle" >
<DIV align="right">< FONT size="2" face="Verdana, Arial, Helvetica,
sans-serif">
Mail Subject: </FONT> </DIV>
</TD>
<TD width="354">
<!-- <INPUT type="text" name="strSubjec t" size="40"> <br>-->
<select name="strSubjec t" onblur="validFi eld()" style="width:30 0">
<span ID="nameSPAN1" style="font-size:8pt;font-face:verdana" ></span>
<option value="none"> Select a Subject
</select></TD>
</TR>
<TR>
<TD width="179" valign="middle" height="207">
<DIV align="right">
<FONT face="Verdana, Arial, Helvetica, sans-serif" size="2">
Comments:</FONT></DIV>
</TD>
<TD width="354" rowspan="2">
<TEXTAREA name="strBody" cols="40" rows="15"></TEXTAREA>
</TD>
</TR>
<TR>
<TD valign="middle" ></TD>
</TR>
</TABLE> &nb sp; &nb sp; &nb sp; &nb sp;
<br>
&nb sp; &nb sp; &nb sp; &nb sp;
<INPUT type="submit" name="Submit" value="SUBMIT" onClick="return
validField()">& nbsp; &nbs p;
<input type="reset" value=" RESET "
onmouseover="st yle.color='red' " onmouseout="sty le.color='black '" style=
"cursor:hand;"> &nb sp;
<input type="button" name="Button" value=" EXIT "
onClick="cancel _cmd()" onmouseover="st yle.color='red' "
onmouseout="sty le.color='black '" style=
"cursor:hand;"> &nb sp;
</FORM>
</body>
</html>
<%@ LANGUAGE="VBScr ipt" %>
<% DIM ipAddress
ipAddress=Reque st.Servervariab les("REMOTE_HOS T")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<script>
<!--
function submit_rcd()
{
document.form1. action = "webmail_send.a sp";
document.form1. submit();
}
function cancel_cmd()
{ window.close()
}
function validField() // !!!THIS IS WHERE PROBLEM EXISTS!!!!
{
if (document.formD oubleMenuDMA.st rSubject.value == "")
{ nameSPAN1.inner HTML = "Please select a subject";
nameSPAN1.style .color='#FF0000 ';
alert("Please Enter A Subject");
return false; }
else
{ nameSPAN1.inner HTML = "";
return true; }
}
function validField2()
{ nameSPAN2.inner HTML = "Please type a valid email<br>";
nameSPAN2.style .color='#FF0000 ';
}
function validField3()
{ nameSPAN2.inner HTML = "Valid Email! Thankyou for your
cooperation!<br >";
nameSPAN2.style .color='#00CD66 ';
}
function checkEmail(strF romAddress){ //reference to email field passed
as argument
var fieldValue = strFromAddress. value // store field's entire value in
variable
// Begin Valid Email Address Tests
//if field is not empty
if(fieldValue != ""){
var atSymbol = 0
//loop through field value string
for(var a = 0; a < fieldValue.leng th; a++){
//look for @ symbol and for each @ found, increment atSymbol variable
by 1
if(fieldValue.c harAt(a) == "@"){
atSymbol++
}
}
// if more than 1 @ symbol exists
if(atSymbol > 1){
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
// if 1 @ symbol was found, and it is not the 1st character in string
if(atSymbol == 1 && fieldValue.char At(0) != "@"){
//look for period at 2nd character after @ symbol
var period = fieldValue.inde xOf(".",fieldVa lue.indexOf("@" )+2)
// "." immediately following 1st "." ?
var twoPeriods = (fieldValue.cha rAt((period+1)) == ".") ? true : false
//if period was not found OR 2 periods together OR field contains less
than 5 characters OR period is in last position
if(period == -1 || twoPeriods || fieldValue.leng th < period + 2 ||
fieldValue.char At(fieldValue.l ength-1)=="."){
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
}
// no @ symbol exists or it is in position 0 (the first character of
the field)
else{
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
}
// if field is empty
else{
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
//all tests passed, submit form
//alert("VALID EMAIL ADDRESS!")
validField3()
return true
}
//-->
//-->
</script>
<title>Email Departments</title>
<script language="javas cript">
<!--//
//new Option("text"," value")
//this code changes menus
function nullOptionsDMA( aMenu){
var tot=aMenu.optio ns.length
for (i=0;i<tot;i++)
{
aMenu.options[i]=null
}
aMenu.options.l ength=0;
}
function MySubjectDMA0(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a subject","");
options[1]=new Option("Address ing","Addressin g");
options[2]=new Option("Questio ns","Questions" );
options[3]=new Option("Complai nts","Complaint s");
options[4]=new Option("Comment s","Comments ");
options[5]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA1(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a subject","none" );
options[1]=new Option("Adoptio ns","Adoptions" );
options[2]=new Option("Lost Pets","Lost Pets");
options[3]=new Option("Found Pets","Found Pets");
options[4]=new Option("Licensi ng","Licensing" );
options[5]=new Option("Neuter Commuter","Neut er Commuter");
options[6]=new Option("Microch ips","Microchip s");
options[7]=new Option("Address Updates","Addre ss Updates");
options[8]=new Option("Volunte er Info","Voluntee r Info");
options[9]=new Option("Foster Info","Foster Info");
options[9]=new Option("Communi ty Service Info","Communit y Service
Info");
options[10]=new Option("General ","General" );
options[0].selected=true
}
}
function MySubjectDMA2(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a subject","none" );
options[1]=new Option("Contrac tor Complaints","Co ntractor Complaints");
options[2]=new Option("Non-Permit Work","Non-Permit Work");
options[3]=new Option("Complai nt about Inspecation Result","Compla int
about Inspecation Result");
options[4]=new Option("Informa tion about Permitting Process
","Informat ion about Permitting Process");
options[5]=new Option("Permit Status Request","Permi t Status Request");
options[6]=new Option("Permit Form Request","Permi t Form Request");
options[7]=new Option("Non-Permit Work","Non-Permit Work");
options[8]=new Option("Can I build on my property?","Can I build on my
property?");
options[9]=new Option("Request for Contractor Newsletter via Email
","Request for Contractor Newsletter via Email");
options[10]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA3(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Animal Control","Anima l Control");
options[2]=new Option("Animal Cruelty","Anima l Cruelty");
options[3]=new Option("Litteri ng","Littering" );
options[4]=new Option("Junk and Unserviceable Vehicles","Junk and
Unserviceable Vehicles");
options[5]=new Option("Noise", "Noise");
options[6]=new Option("Zoning Issues","Zoning Issues");
options[7]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA4(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("CDBG Inquiries","CDB G Inquiries");
options[2]=new Option("Ship Program","Ship Program");
options[3]=new Option("Housing Assistance","Ho using Assistance");
options[4]=new Option("Housing Loans","Housing Loans");
options[5]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA5(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA6(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA7(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA8(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA9(a Menu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA10( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Park Fees","Park Fees");
options[2]=new Option("Park Inquiry","Park Inquiry");
options[3]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA11( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Plannin g Inquiries","Pla nning Inquiries");
options[2]=new Option("Transpo rtation Inquiries","Tra nsportation
Inquiries");
options[3]=new Option("Transpo rtation Impact Fees","Transpor tation
Impact Fees");
options[4]=new Option("Fire Impact Fees","Fire Impact Fees");
options[5]=new Option("Propert y Access-Easements","Pro perty
Access-Easements");
options[6]=new Option("Surplus Land Sales","Surplus Land Sales");
options[7]=new Option("Plat Vacations","Pla t Vacations");
options[8]=new Option("Road Closings","Road Closings");
options[9]=new Option("Scenic Roads","Scenic Roads");
options[10]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA12( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA13( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Right of Way Permits","Right of Way Permits");
options[3]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA14( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA15( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA16( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA16( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Roadway Project Inquiries","Roa dway Project
Inquiries");
options[2]=new Option("Speed Limit Inquiries","Spe ed Limit Inquiries");
options[3]=new Option("General ");
options[0].selected=true
}
}
function MySubjectDMA17( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA18( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA19( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA20( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA21( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
function MySubjectDMA22( aMenu){
nullOptionsDMA( aMenu)
with (aMenu){
//Rewrites the text and values
options[0]=new Option("Select a page","none");
options[1]=new Option("Questio ns","Questions" );
options[2]=new Option("Complai nts","Complaint s");
options[3]=new Option("Comment s","Comments ");
options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true
}
}
/* ############### ######## goDM() ############### ######## */
function goDMA(aMenu){
if (aMenu.options. value!="none")
{
location=aMenu. options[aMenu.selectedI ndex].value
}
}
/* ############### ######## setUp ############### ######## */
function setUpDMA(){
with (document.formD oubleMenuDMA) {
if (strDept.select edIndex==0){
strDept.options[0].selected=true
strSubject.opti ons[0].selected=true
}
if (strDept.select edIndex==1)
MySubjectDMA0(s trSubject)
if (strDept.select edIndex==2)
MySubjectDMA1(s trSubject)
if (strDept.select edIndex==3)
MySubjectDMA2(s trSubject)
if (strDept.select edIndex==4)
MySubjectDMA3(s trSubject)
if (strDept.select edIndex==5)
MySubjectDMA4(s trSubject)
if (strDept.select edIndex==6)
MySubjectDMA5(s trSubject)
if (strDept.select edIndex==7)
MySubjectDMA6(s trSubject)
if (strDept.select edIndex==8)
MySubjectDMA7(s trSubject)
if (strDept.select edIndex==9)
MySubjectDMA8(s trSubject)
if (strDept.select edIndex==10)
MySubjectDMA9(s trSubject)
if (strDept.select edIndex==11)
MySubjectDMA10( strSubject)
if (strDept.select edIndex==12)
MySubjectDMA11( strSubject)
if (strDept.select edIndex==13)
MySubjectDMA12( strSubject)
if (strDept.select edIndex==14)
MySubjectDMA13( strSubject)
if (strDept.select edIndex==15)
MySubjectDMA14( strSubject)
if (strDept.select edIndex==16)
MySubjectDMA15( strSubject)
if (strDept.select edIndex==17)
MySubjectDMA16( strSubject)
}
}
/* ############### ######## changeFiles ############### ######## */
function changeFilesDMA( ){
aMenu=document. formDoubleMenuD MA.strDept
aMenu2=document .formDoubleMenu DMA.strSubject
with (aMenu){
switch (selectedIndex) {
case 0:
aMenu2.options. length=0;
aMenu2.options[0]=
new Option("Pages appear here","none")
aMenu2.options[0].selected=true;
history.go(0)
break
case 1:
MySubjectDMA0(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 2:
MySubjectDMA1(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 3:
MySubjectDMA2(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 4:
MySubjectDMA3(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 5:
MySubjectDMA4(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 6:
MySubjectDMA5(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 7:
MySubjectDMA6(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 8:
MySubjectDMA7(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 9:
MySubjectDMA8(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 10:
MySubjectDMA9(a Menu2)
aMenu2.options[0].text="Select a Subject"
break
case 11:
MySubjectDMA10( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 12:
MySubjectDMA11( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 13:
MySubjectDMA12( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 14:
MySubjectDMA13( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 15:
MySubjectDMA14( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 16:
MySubjectDMA15( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 17:
MySubjectDMA16( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
case 18:
MySubjectDMA17( aMenu2)
aMenu2.options[0].text="Select a Subject"
break
}
}
}
//-->
</script>
<meta name="Microsoft Theme" content="intern et 011, default">
<meta name="Microsoft Border" content="t">
</head>
<body onLoad="setUpDM A()">
<FORM name="formDoubl eMenuDMA" method="post"
action="../department_form s/webmail_send.as p">
<input type="hidden" name="ipAddress "
value="<%Respon se.Write(ipAddr ess)%>">
<table border="0" cellpadding="0" style="border-collapse:
collapse" width="66%" id="table2">
<tr>
<td>
<u><b><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Email Your
Comments or Complaints<br>
</font></b></u><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">You can
use this form to email your comments or notify the County of a
complaint which you may have. Select the department and subject from
the drop down menus provided to help us route your email to the
proper County office. Please enter a valid email address. If you
wish to be contacted other than by email, please include your
address and phone number in the comment area.</font></td>
</tr>
</table>
<p align="left">
<b>
<TABLE width="543" border="0" id="table1">
<TR>
<TD width="179" valign="middle" >
<DIV align="right">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Your
address: </font> </DIV>
</TD>
<TD width="354">
<INPUT type="text" name="strFromAd dress"
onblur="checkEm ail(strFromAddr ess)" size="40" tabindex="1"><b r>
<span ID="nameSPAN2"
style="font-size:8pt;font-face:verdana"></span></TD>
</TR>
<TR>
<TD width="179" valign="middle" >
<DIV align="right">
<font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Depart ment
to Contact: </font></DIV>
</TD>
<TD width="354">
<select name="strDept" onChange="chang eFilesDMA()">
<option value="none" >Select a department
<option value="911 Management"> 911 Management</option>
<option value="Animal Center"> Animal Center</option>
<option value="Building "> Building Dept</option>
<option value="Code Enforcement"> Code Enforcement</option>
<option value="Communit y Services"> Community Services</option>
<option value="Developm ent Review"> Engineering</option>
<option value="Drainage "> Engineering</option>
<option value="Fleet"> Fleet Management</option>
<option value="GIS"> GIS</option>
<option value="Master Gardener"> Master Gardener</option>
<option value="Parks and Recreation"> Parks and Recreation</option>
<option value="Planning "> Planning Department</option>
<option value="Public Affairs"> Public Affairs</option>
<option value="Right of Way"> Right of Way</option>
<option value="Roads"> Road Department</option>
<option value="Solid Waste"> Solid Waste</option>
<option value="Survey"> Survey</option>
<option value="Transpor tation"> Transportation</option>
<option value="Traffic" > Traffic</option>
<option value="Utilitie s"> Utilities</option>
<option value="VA"> Veterans Affairs</option>
<option value="VetPark" > Veterans Park</option>
<option value="Zoning"> Zoning Department</option>
</select></TD>
</TR>
<TR>
<TD width="179" valign="middle" >
<DIV align="right">< FONT size="2" face="Verdana, Arial, Helvetica,
sans-serif">
Mail Subject: </FONT> </DIV>
</TD>
<TD width="354">
<!-- <INPUT type="text" name="strSubjec t" size="40"> <br>-->
<select name="strSubjec t" onblur="validFi eld()" style="width:30 0">
<span ID="nameSPAN1" style="font-size:8pt;font-face:verdana" ></span>
<option value="none"> Select a Subject
</select></TD>
</TR>
<TR>
<TD width="179" valign="middle" height="207">
<DIV align="right">
<FONT face="Verdana, Arial, Helvetica, sans-serif" size="2">
Comments:</FONT></DIV>
</TD>
<TD width="354" rowspan="2">
<TEXTAREA name="strBody" cols="40" rows="15"></TEXTAREA>
</TD>
</TR>
<TR>
<TD valign="middle" ></TD>
</TR>
</TABLE> &nb sp; &nb sp; &nb sp; &nb sp;
<br>
&nb sp; &nb sp; &nb sp; &nb sp;
<INPUT type="submit" name="Submit" value="SUBMIT" onClick="return
validField()">& nbsp; &nbs p;
<input type="reset" value=" RESET "
onmouseover="st yle.color='red' " onmouseout="sty le.color='black '" style=
"cursor:hand;"> &nb sp;
<input type="button" name="Button" value=" EXIT "
onClick="cancel _cmd()" onmouseover="st yle.color='red' "
onmouseout="sty le.color='black '" style=
"cursor:hand;"> &nb sp;
</FORM>
</body>
</html>
Comment