Reputation: 10247
I tried to add a dropdown/select element to a page like so:
<select name="subcategory" color="#000000" style="font: 8pt arial" onchange="UpdateFlag=true;">
<option value="3">Eastern
<option value="2">Central
<option value="1">Mountain
<option selected value="0">Pacific
</select>
(the values (Eastern, etc.) are bogus placeholders for now - I'm just taking this one step at a time, the first one being to see if it would display on the page - it doesn't.
The last part of the html table, to show this in a little more context, is:
<td nowrap align="left" valign="top">
<select name="TimeZone" color="#000000" style="font: 8pt arial" onchange="UpdateFlag=true;">
<option value="3">Eastern
<option value="2">Central
<option value="1">Mountain
<option selected value="0">Pacific
</select>
<font color="#000000" style="font: 8pt arial"> </font>
<font color="#000000" style="font: 8pt arial">Cut-Off Times </font>
<font color="#000000" style="font: 8pt arial">Same Day: </font>
<input name="CutOffTimeSD" type="text" style="font: 8pt arial" size="1" maxlength="5" onfocus="this.select();" onchange="UpdateFlag=true;" value=" ">
<font color="#000000" style="font: 8pt arial"> </font>
<font color="#000000" style="font: 8pt arial">Next Day: </font>
<input name="CutOffTime" type="text" style="font: 8pt arial" size="1" maxlength="5" onfocus="this.select();" onchange="UpdateFlag=true;" value="10:00">
</td>
</tr>
<tr>
<td nowrap align="left" valign="top">
<font color="#000000" style="font: 8pt arial">Options: </font>
</td>
<td nowrap align="left" valign="top">
<input name="SurveyFlag" type="checkbox" style="font: 8pt arial" size="1" maxlength="1" onfocus="this.select();" onchange="UpdateFlag=true;" value="-1" >
<font color="#000000" style="font: 8pt arial">Participate in online surveys </font>
</td>
</tr>
<tr>
<td nowrap align="left" valign="top">
<font color="#000000" style="font: 8pt arial">Email: </font>
</td>
<td nowrap align="left" valign="top">
<input name="Email" type="text" style="font: 8pt arial" size="100" maxlength="100" onfocus="this.select();" onchange="UpdateFlag=true;" value="">
</td>
</tr>
<tr>
<select name="subcategory" color="#000000" style="font: 8pt arial" onchange="UpdateFlag=true;">
<option value="3">Eastern
<option value="2">Central
<option value="1">Mountain
<option selected value="0">Pacific
</select>
</tr>
</table>
The code above is pulled from the page as it is displaying (via the contextual "View Source" menu item).
So why does the "subcategory" dropdown not display? The email label and long textbox to its right are the last things visible, even though the htmlselect should appear beneath it, based on the html.
Upvotes: 0
Views: 371
Reputation: 1165
You're missing the <td>
tag.
Try
<tr>
<td>
<select name="subcategory" color="#000000" style="font: 8pt arial" onchange="UpdateFlag=true;">
<option value="3">Eastern
<option value="2">Central
<option value="1">Mountain
<option selected value="0">Pacific
</select>
</td>
</tr>
Upvotes: 1