Here is my question, I would like to modify this code
1- right after you select a year another dorp down menu will enable and ask you to enter the station number and i would like to change this from station number to letting number after i make a year selection.if someone has an idea how i can acomplish that.
thank you
function viewATRStation(){
document.form2.atrstation.disabled=true;
if(document.form2.atrstationyear.value!="" && document.form2.atrstation.value!=""){
var stnum=document.form2.atrstation.value;
var year=document.form2.atrstationyear.value;
var strvalue="ATR"+stnum+".TXT";
window.open(year+"/"+strvalue);
}
else{
if(document.form2.atrstationyear.value=="" && document.form2.atrstation.value!=""){
alert("Please select the year.");
}
else if(document.form2.atrstationyear.value!="" && document.form2.atrstation.value==""){
alert("Please select the station number.");
}
else{
alert("Please select the year and then the station number.");
document.form2.atrstation.disabled=true;
}
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Office of Mn/DOT Transportation Data & Analysis - Automatic Traffic Recorder (ATR)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--Your Header information should be copied into this location replacing the information between the first <head> under the <html> and the </head> right under this statement. -->
<STYLE TYPE="text/css">
<!--.nound{text-decoration:none}
.style1{
font-size:9pt;
font-weight:bold;
color:#663300;
text-align:right;
}
-->
</STYLE>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="../js/topnav.js" type="text/javascript"></script>
<script language="JavaScript" src="atr.js" type="text/javascript"></script>
</head>
<!--This style code defines a class named "nound" which is easier to type than 'style="text-decoration:none"' -->
<body bgcolor="#FFFFFF" background="/images/templates/green.gif">
<table border="0" cellspacing="0" cellpadding="3" width="739">
<tr>
<td width="168" align="left" valign="top">
<p> <img src="/images/templates/spacer.gif" alt="Mn/DOT Home" width="30" height="71">
<a href="/"><img src="/images/templates/logo.gif" width="71" height="71" alt="Mn/DOT Home" border="0"></a>
<!--This is where you can insert your own navigation items. Begin Here. -->
<font face="Arial, Helvetica, sans-serif, Geneva, Swiss" size="2">
<hr width="128" size="5" align="left">
<table border="0" width="127">
<tr>
<td width="119" bgcolor="#999966" align="center" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/whatsnew.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">What's New</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/aboutus.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">About Us</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/sitemap.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'"> Sitemap</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/faq.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">FAQ</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/glossary.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">Glossary</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/contactus.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">Contact Us</a></td>
</tr>
</table>
</font>
<!--This is where you can insert your own navigation items. End Here. -->
<hr width="128" size="5" align="left"><br>
<b> <a class="nound" href="/"><font face="Arial, Helvetica, sans-serif, Geneva, Swiss" size="2">Mn/DOT
Home <br>
</font></a></b><font face="Arial, Helvetica, sans-serif, Geneva, Swiss" size="2"><a class="nound" href="/information/faq.html">FAQ</a><br>
<a class="nound" href="/information/sitemap.html">Site Map</a><br>
<a class="nound" href=" <a class="nound" href="mailto:info@dot.state.mn.us">Info@DOT</a></font>
<hr width="128" size="5" align="left">
<a href=" src=" width="24" height="62" border="0" alt="Spacer Gif File"><img src="/images/templates/511mn.gif" width="74" height="62" border="0" alt="511mn.org Logo"></a>
</td>
<td valign="top" align="left" background="../images/countyspot.gif" width="559">
<!--===========================main content here==========================================-->
<table border="0" width="100%" height="1001">
<tr>
<td height="122">
<p align="center"><img border="0" src="../images/headerlogo1.jpg" width="510" height="116">
</td>
</tr>
<tr>
<td height="1">
<script language="JavaScript" type="text/javascript">
<!-- hidden from old browsers
document.write(topnav);
//-->
</script>
</td>
</tr>
<tr>
<td bgcolor="#336666" height="3"> </td>
</tr>
<tr>
<td bgcolor="#999966" height="3"> </td>
</tr>
<tr>
<td bgcolor="#cccccc" height="3"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td bgcolor="#ffffcc" height="129">
</td>
</tr>
<tr>
<td bgcolor="#cccccc" height="3"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td align="center" height="69">
<form name="form3"><!--form3: ATR Station List and Location Maps-->
<table border="0" width="100%">
<tr>
<td colspan="3" class="special" align="center" bgcolor="#cccc99">
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td bgcolor="#cccccc" height="3"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td bgcolor="#ffffcc" align="center" height="157">
<form name="form2"><!--form2: ATR Hourly Volume-->
<table border="0">
<tr>
<td colspan="4"><img src="../images/spacer.gif" width="1" height="20"></td>
</tr>
<tr>
<td colspan="4" class="special5">Automatic Traffic Recorder (ATR) Hourly Volume (Continuous Count Station)</td>
</tr>
<tr>
<td class="style1">Which year?</td>
<td><select name="atrstationyear" onchange="enabledATRStation();">
<option value="">Select a year</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
</select>
</td>
<td class="style1">ATR Station Number</td>
<td><select name="atrstation" disabled="disabled">
<option value="">Station</option>
</select>
</td>
</tr>
<tr>
<td align="center" colspan="4">
<input type="button" value="View ATR Count " onclick="viewATRStation();" />
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td bgcolor="#cccccc" height="3"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="17"><img src="../images/spacer.gif" width="1" height="15"></td>
</tr>
<tr>
<td align="center" height="152"><br />
</td>
</tr>
<tr>
<td bgcolor="#99ccff" height="3"><img src="../images/spacer.gif" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" height="183"><script language="JavaScript" src="../js/footer.js" type="text/javascript"></script><br />
<hr>
<div align="center">
<p><font face="Arial, Helvetica, sans-serif" size="-2"> <a href="/around.html">Getting
Around</a> | <a href="/news.html">News & Views</a> | <a href="/hot.html">Hot
Topics</a> | <a href="/about.html">About Mn/DOT</a> | <a href="/careers.html">Careers/Jobs</a>
| <a href="/atoz.html">Mn/DOT A-Z</a> | <a href=" href="/construction.html"><br>
</a><a href="/projects/">Projects/Studies</a> | <a href="/business.html">Doing
Business</a> | <a href="/involve.html">Get Involved</a> | <a href="/reslib.html">Research/Library</a>
| <a href="/links.html">Links</a> | <a href="/newtech.html">New Technologies</a><br>
Minnesota Government links: <a href=" | <a href=" Office</a><br>
<br>
©2004 Minnesota Department of Transportation<br>
395 John Ireland Boulevard <b>•</b> St. Paul, MN 55155-1899<br>
Phone: 800/657-3774 <b>• </b>800/627-3529(TTY, Voice, ASCII)</font></p>
<p> </p>
</div>
</td>
</tr>
</table>
<!--=========================================================================-->
</td>
</tr>
</table>
</body>
</html>
1- right after you select a year another dorp down menu will enable and ask you to enter the station number and i would like to change this from station number to letting number after i make a year selection.if someone has an idea how i can acomplish that.
thank you
function viewATRStation(){
document.form2.atrstation.disabled=true;
if(document.form2.atrstationyear.value!="" && document.form2.atrstation.value!=""){
var stnum=document.form2.atrstation.value;
var year=document.form2.atrstationyear.value;
var strvalue="ATR"+stnum+".TXT";
window.open(year+"/"+strvalue);
}
else{
if(document.form2.atrstationyear.value=="" && document.form2.atrstation.value!=""){
alert("Please select the year.");
}
else if(document.form2.atrstationyear.value!="" && document.form2.atrstation.value==""){
alert("Please select the station number.");
}
else{
alert("Please select the year and then the station number.");
document.form2.atrstation.disabled=true;
}
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Office of Mn/DOT Transportation Data & Analysis - Automatic Traffic Recorder (ATR)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--Your Header information should be copied into this location replacing the information between the first <head> under the <html> and the </head> right under this statement. -->
<STYLE TYPE="text/css">
<!--.nound{text-decoration:none}
.style1{
font-size:9pt;
font-weight:bold;
color:#663300;
text-align:right;
}
-->
</STYLE>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="../js/topnav.js" type="text/javascript"></script>
<script language="JavaScript" src="atr.js" type="text/javascript"></script>
</head>
<!--This style code defines a class named "nound" which is easier to type than 'style="text-decoration:none"' -->
<body bgcolor="#FFFFFF" background="/images/templates/green.gif">
<table border="0" cellspacing="0" cellpadding="3" width="739">
<tr>
<td width="168" align="left" valign="top">
<p> <img src="/images/templates/spacer.gif" alt="Mn/DOT Home" width="30" height="71">
<a href="/"><img src="/images/templates/logo.gif" width="71" height="71" alt="Mn/DOT Home" border="0"></a>
<!--This is where you can insert your own navigation items. Begin Here. -->
<font face="Arial, Helvetica, sans-serif, Geneva, Swiss" size="2">
<hr width="128" size="5" align="left">
<table border="0" width="127">
<tr>
<td width="119" bgcolor="#999966" align="center" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/whatsnew.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">What's New</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/aboutus.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">About Us</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/sitemap.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'"> Sitemap</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/faq.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">FAQ</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/glossary.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">Glossary</a></td>
</tr>
<tr>
<td width="119" align="center" bgcolor="#999966" onmouseover="style.background='#cc9966'; style.color='#0000ff'" onmouseout="style.background='#999966'; style.color='#000000'"><a href="/tda/html/contactus.html" style="color:#000000;" onmouseover="style.color='#0000ff'" onmouseout="style.color='#000000'">Contact Us</a></td>
</tr>
</table>
</font>
<!--This is where you can insert your own navigation items. End Here. -->
<hr width="128" size="5" align="left"><br>
<b> <a class="nound" href="/"><font face="Arial, Helvetica, sans-serif, Geneva, Swiss" size="2">Mn/DOT
Home <br>
</font></a></b><font face="Arial, Helvetica, sans-serif, Geneva, Swiss" size="2"><a class="nound" href="/information/faq.html">FAQ</a><br>
<a class="nound" href="/information/sitemap.html">Site Map</a><br>
<a class="nound" href=" <a class="nound" href="mailto:info@dot.state.mn.us">Info@DOT</a></font>
<hr width="128" size="5" align="left">
<a href=" src=" width="24" height="62" border="0" alt="Spacer Gif File"><img src="/images/templates/511mn.gif" width="74" height="62" border="0" alt="511mn.org Logo"></a>
</td>
<td valign="top" align="left" background="../images/countyspot.gif" width="559">
<!--===========================main content here==========================================-->
<table border="0" width="100%" height="1001">
<tr>
<td height="122">
<p align="center"><img border="0" src="../images/headerlogo1.jpg" width="510" height="116">
</td>
</tr>
<tr>
<td height="1">
<script language="JavaScript" type="text/javascript">
<!-- hidden from old browsers
document.write(topnav);
//-->
</script>
</td>
</tr>
<tr>
<td bgcolor="#336666" height="3"> </td>
</tr>
<tr>
<td bgcolor="#999966" height="3"> </td>
</tr>
<tr>
<td bgcolor="#cccccc" height="3"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td bgcolor="#ffffcc" height="129">
</td>
</tr>
<tr>
<td bgcolor="#cccccc" height="3"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td align="center" height="69">
<form name="form3"><!--form3: ATR Station List and Location Maps-->
<table border="0" width="100%">
<tr>
<td colspan="3" class="special" align="center" bgcolor="#cccc99">
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td bgcolor="#cccccc" height="3"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td bgcolor="#ffffcc" align="center" height="157">
<form name="form2"><!--form2: ATR Hourly Volume-->
<table border="0">
<tr>
<td colspan="4"><img src="../images/spacer.gif" width="1" height="20"></td>
</tr>
<tr>
<td colspan="4" class="special5">Automatic Traffic Recorder (ATR) Hourly Volume (Continuous Count Station)</td>
</tr>
<tr>
<td class="style1">Which year?</td>
<td><select name="atrstationyear" onchange="enabledATRStation();">
<option value="">Select a year</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
</select>
</td>
<td class="style1">ATR Station Number</td>
<td><select name="atrstation" disabled="disabled">
<option value="">Station</option>
</select>
</td>
</tr>
<tr>
<td align="center" colspan="4">
<input type="button" value="View ATR Count " onclick="viewATRStation();" />
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td bgcolor="#cccccc" height="3"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="17"><img src="../images/spacer.gif" width="1" height="15"></td>
</tr>
<tr>
<td align="center" height="152"><br />
</td>
</tr>
<tr>
<td bgcolor="#99ccff" height="3"><img src="../images/spacer.gif" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" height="183"><script language="JavaScript" src="../js/footer.js" type="text/javascript"></script><br />
<hr>
<div align="center">
<p><font face="Arial, Helvetica, sans-serif" size="-2"> <a href="/around.html">Getting
Around</a> | <a href="/news.html">News & Views</a> | <a href="/hot.html">Hot
Topics</a> | <a href="/about.html">About Mn/DOT</a> | <a href="/careers.html">Careers/Jobs</a>
| <a href="/atoz.html">Mn/DOT A-Z</a> | <a href=" href="/construction.html"><br>
</a><a href="/projects/">Projects/Studies</a> | <a href="/business.html">Doing
Business</a> | <a href="/involve.html">Get Involved</a> | <a href="/reslib.html">Research/Library</a>
| <a href="/links.html">Links</a> | <a href="/newtech.html">New Technologies</a><br>
Minnesota Government links: <a href=" | <a href=" Office</a><br>
<br>
©2004 Minnesota Department of Transportation<br>
395 John Ireland Boulevard <b>•</b> St. Paul, MN 55155-1899<br>
Phone: 800/657-3774 <b>• </b>800/627-3529(TTY, Voice, ASCII)</font></p>
<p> </p>
</div>
</td>
</tr>
</table>
<!--=========================================================================-->
</td>
</tr>
</table>
</body>
</html>