P
pfldparkdistrict
I need help customizing javascript for a drop-down box (text needing
customization appears below). Here's what I want to do: when someone selects
an option in my drop-down box, they are directed to the correct page. When
they click "back" and go to the previous page, I want the drop-down box
selection to reset to the default option ("Go to a Division Page").
Currently, when someone clicks "back", they see the option they selected in
the drop-down box.
Here's the html for my drop-down box:
<form onsubmit="return FrontPage_Form1_Validator(this)"
language="JavaScript" name="FrontPage_Form1"><p style="margin-bottom:
-20"><font size="2"><nobr>
<!--webbot bot="Validation" s-display-name="Division Page Choice"
b-disallow-first-item="TRUE" --><select name="section" size="1"
language="javascript" onChange="gotoPage(this.selectedIndex);">
<option selected value="Go to a Division page">Go to a Division
page</option>
<option>- - - - - - - - - - - - - - - - -</option>
<option>Building Division</option>
<option>Code Enforcement Division</option>
<option>Historic Preservation Commission</option>
<option>Planning & Zoning Commission</option>
<option>Planning Division</option>
<option>Waste Services Division</option>
<option>Zoning Division</option>
</select></font></nobr></p></form>
<script language="JavaScript">
<!--
function gotoPage(varItem)
{
switch(varItem)
{
case 0:
window.parent.self.status="Goes Nowhere";
break;
case 1:
window.parent.self.status="Goes Nowhere";
break;
case 2:
window.location="Building/BuildMain.html";
break;
case 3:
window.location="Code/CodeMain.html";
break;
case 4:
window.location="HPC/HPCMain.html";
break;
case 5:
window.location="PZC/PZCMain.html";
break;
case 6:
window.location="Planning/PlanMain.html";
break;
case 7:
window.location="WasteServ/WasteMain.html";
break;
case 8:
window.location="Zoning/ZoningMain.html";
break;
}
}
// -->
</script>
What do I have to change?
Thanks in advance.
customization appears below). Here's what I want to do: when someone selects
an option in my drop-down box, they are directed to the correct page. When
they click "back" and go to the previous page, I want the drop-down box
selection to reset to the default option ("Go to a Division Page").
Currently, when someone clicks "back", they see the option they selected in
the drop-down box.
Here's the html for my drop-down box:
<form onsubmit="return FrontPage_Form1_Validator(this)"
language="JavaScript" name="FrontPage_Form1"><p style="margin-bottom:
-20"><font size="2"><nobr>
<!--webbot bot="Validation" s-display-name="Division Page Choice"
b-disallow-first-item="TRUE" --><select name="section" size="1"
language="javascript" onChange="gotoPage(this.selectedIndex);">
<option selected value="Go to a Division page">Go to a Division
page</option>
<option>- - - - - - - - - - - - - - - - -</option>
<option>Building Division</option>
<option>Code Enforcement Division</option>
<option>Historic Preservation Commission</option>
<option>Planning & Zoning Commission</option>
<option>Planning Division</option>
<option>Waste Services Division</option>
<option>Zoning Division</option>
</select></font></nobr></p></form>
<script language="JavaScript">
<!--
function gotoPage(varItem)
{
switch(varItem)
{
case 0:
window.parent.self.status="Goes Nowhere";
break;
case 1:
window.parent.self.status="Goes Nowhere";
break;
case 2:
window.location="Building/BuildMain.html";
break;
case 3:
window.location="Code/CodeMain.html";
break;
case 4:
window.location="HPC/HPCMain.html";
break;
case 5:
window.location="PZC/PZCMain.html";
break;
case 6:
window.location="Planning/PlanMain.html";
break;
case 7:
window.location="WasteServ/WasteMain.html";
break;
case 8:
window.location="Zoning/ZoningMain.html";
break;
}
}
// -->
</script>
What do I have to change?
Thanks in advance.