script help needed

P

pfldparkdistrict

I would like to create a drop-down list embedded in a table cell. The
html/java code for this section of my web page is included below.

The problem I'm having is that when I preview the table as written,
there is a huge space in the cell containing the drop-down box below
the box. Is there a way to modify the code so that the drop-down box
cell appears the same size as the other cells in that table? Thanks!

<table border="1" cellpadding="10" id="AutoNumber2" bgcolor="#008000"
bordercolor="#000000" cellspacing="10">

<tr>
<td>
<a style="text-decoration: none" href="index.html">
<b>
<font color="#FFCC33" size="2">Land Use Home</font></b></a></td>
</tr>
<tr>
<td>
<form>
<!--webbot bot="Validation" s-display-name="Division Name"
b-value-required="TRUE" b-disallow-first-item="TRUE" --><select
name="section" size="1" language="javascript"
onChange="gotoPage(this.selectedIndex)">
<option selected>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>
</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>
</font></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="MapToLocation.html">
<font size="2" color="#FFCC33">Map to the Land Use
Department</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none"
href="Agendas&Minutes/CurrentAgendas.html">
<font size="2" color="#FFCC33">Current Agendas</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="ContactUs.html">
<font size="2" color="#FFCC33">Contact Us</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="Links.html">
<font size="2" color="#FFCC33">Links to Other Web
Sites</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="FOIA.html">
<font size="2" color="#FFCC33">Request for
Records</font></a></b></td>
</tr>
<tr>
<td><b>
<a target="_blank" style="text-decoration: none"
href="Planning/PlanResources/developershandbook.pdf">
<font color="#FFCC33" size="2">Developers
Handbook</font></a></b></td>
</tr>
</table>
 
C

clintonG

The Form can become a block level element. Try this...

<!--webbot bot="Validation" s-display-name="Division Name"
b-value-required="TRUE" b-disallow-first-item="TRUE" -->
<form>
<table border="1" cellpadding="10" id="AutoNumber2" bgcolor="#008000"
bordercolor="#000000" cellspacing="10">
<tr>
<td>
<a style="text-decoration: none" href="index.html">
<b>
<font color="#FFCC33" size="2">Land Use Home</font></b></a></td>
</tr>
<tr>
<td>
<select
name="section" size="1" language="javascript"
onChange="gotoPage(this.selectedIndex)">
<option selected>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>
</td>
</tr>
</table>
</form>

--
<%= Clinton Gallagher
METROmilwaukee "Regional Information Services"
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
 
J

Jon Spivey

It's probably easiest to lose the FP validation and the script and get the
form tags out of the table
<form>
<table><tr><td>
<select
onchange="if(this.options.selectedIndex>0)location.href=thisoptions[this.options.selectedIndex].value;">
<option selected>Go to a Division page</option>
<option value="Building/BuildMain.html">Building Division</option>
<option value="Code/CodeMain.html">Code Enforcement Division</option>
etc
 
M

Murray

onchange="if(this.options.selectedIndex>0)location.href=this.options
----------------------------------------------------------^^^^^
[this.options.selectedIndex].value;">

No?

--
Murray

Jon Spivey said:
It's probably easiest to lose the FP validation and the script and get the
form tags out of the table
<form>
<table><tr><td>
<select
onchange="if(this.options.selectedIndex>0)location.href=thisoptions[this.options.selectedIndex].value;">
<option selected>Go to a Division page</option>
<option value="Building/BuildMain.html">Building Division</option>
<option value="Code/CodeMain.html">Code Enforcement Division</option>
etc

--
Cheers,
Jon
Microsoft MVP

pfldparkdistrict said:
I would like to create a drop-down list embedded in a table cell. The
html/java code for this section of my web page is included below.

The problem I'm having is that when I preview the table as written,
there is a huge space in the cell containing the drop-down box below
the box. Is there a way to modify the code so that the drop-down box
cell appears the same size as the other cells in that table? Thanks!

<table border="1" cellpadding="10" id="AutoNumber2" bgcolor="#008000"
bordercolor="#000000" cellspacing="10">

<tr>
<td>
<a style="text-decoration: none" href="index.html">
<b>
<font color="#FFCC33" size="2">Land Use Home</font></b></a></td>
</tr>
<tr>
<td>
<form>
<!--webbot bot="Validation" s-display-name="Division Name"
b-value-required="TRUE" b-disallow-first-item="TRUE" --><select
name="section" size="1" language="javascript"
onChange="gotoPage(this.selectedIndex)">
<option selected>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>
</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>
</font></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="MapToLocation.html">
<font size="2" color="#FFCC33">Map to the Land Use
Department</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none"
href="Agendas&Minutes/CurrentAgendas.html">
<font size="2" color="#FFCC33">Current Agendas</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="ContactUs.html">
<font size="2" color="#FFCC33">Contact Us</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="Links.html">
<font size="2" color="#FFCC33">Links to Other Web
Sites</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="FOIA.html">
<font size="2" color="#FFCC33">Request for
Records</font></a></b></td>
</tr>
<tr>
<td><b>
<a target="_blank" style="text-decoration: none"
href="Planning/PlanResources/developershandbook.pdf">
<font color="#FFCC33" size="2">Developers
Handbook</font></a></b></td>
</tr>
</table>
 
J

Jon Spivey

Good catch :)

--
Cheers,
Jon
Microsoft MVP

onchange="if(this.options.selectedIndex>0)location.href=this.options
----------------------------------------------------------^^^^^
[this.options.selectedIndex].value;">

No?

--
Murray

Jon Spivey said:
It's probably easiest to lose the FP validation and the script and get the
form tags out of the table
<form>
<table><tr><td>
<select
onchange="if(this.options.selectedIndex>0)location.href=thisoptions[this.options.selectedIndex].value;">
<option selected>Go to a Division page</option>
<option value="Building/BuildMain.html">Building Division</option>
<option value="Code/CodeMain.html">Code Enforcement Division</option>
etc

--
Cheers,
Jon
Microsoft MVP

pfldparkdistrict said:
I would like to create a drop-down list embedded in a table cell. The
html/java code for this section of my web page is included below.

The problem I'm having is that when I preview the table as written,
there is a huge space in the cell containing the drop-down box below
the box. Is there a way to modify the code so that the drop-down box
cell appears the same size as the other cells in that table? Thanks!

<table border="1" cellpadding="10" id="AutoNumber2" bgcolor="#008000"
bordercolor="#000000" cellspacing="10">

<tr>
<td>
<a style="text-decoration: none" href="index.html">
<b>
<font color="#FFCC33" size="2">Land Use Home</font></b></a></td>
</tr>
<tr>
<td>
<form>
<!--webbot bot="Validation" s-display-name="Division Name"
b-value-required="TRUE" b-disallow-first-item="TRUE" --><select
name="section" size="1" language="javascript"
onChange="gotoPage(this.selectedIndex)">
<option selected>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>
</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>
</font></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="MapToLocation.html">
<font size="2" color="#FFCC33">Map to the Land Use
Department</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none"
href="Agendas&Minutes/CurrentAgendas.html">
<font size="2" color="#FFCC33">Current Agendas</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="ContactUs.html">
<font size="2" color="#FFCC33">Contact Us</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="Links.html">
<font size="2" color="#FFCC33">Links to Other Web
Sites</font></a></b></td>
</tr>
<tr>
<td><b>
<a style="text-decoration: none" href="FOIA.html">
<font size="2" color="#FFCC33">Request for
Records</font></a></b></td>
</tr>
<tr>
<td><b>
<a target="_blank" style="text-decoration: none"
href="Planning/PlanResources/developershandbook.pdf">
<font color="#FFCC33" size="2">Developers
Handbook</font></a></b></td>
</tr>
</table>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top