Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Broken Span

Status
Not open for further replies.

DANZIG

Technical User
Mar 8, 2001
142
US
Hello

Can anybody see anything in the code below that would cause the span to to be working?




<html>
<head>
<title>New Page 7</title>
</head>
<script language="vbscript">

sub action_type
Select Case Document.all.ActionType.value
Case "New Action"
Document.all.OptionsLists.style.display = ""
Case Else
Document.all.OptionsLists.style.display = "none"
end select
end sub

</script>
<body>
<center>
<table border="0" width="900">
<tr>
<td align="center"><font face="Arial" color="#000080" size="6">Systems Management Center</font>
</td>
</tr>
<tr>
<td align="center">&nbsp;
</td>
</tr>
<tr>
<td align="center">
<p align="left">
<font face="Arial">Action Type:</font>
<select size="1" name="ActionType" onchange="action_type">
<option value="Select Action Type">Select Action Type</option>
<option value="New Action">New Action</option>
</select>
</td>
</tr>
<span ID="OptionsLists" style="display: none">
<tr>
<td align="center">
<table border="0" width="900">
<tr>
<td>
<form name="DevicesList">
<font face="Arial">Available Options</font>
</td>
<td align="center" width="449">
<font face="Arial">Selected Options</font>
</td>
</tr>
<tr>
<td align="center" width="449">
<select name=AvailableOptions size=12>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</td>
<td align="center" width="449">
<select size=12 name=SelectedOptions>
</select>
</from>
</td>
</tr>
</table>
</td>
</tr>
</span>
</table>
</center>
</body>
</html>


Thanks in advance.
 
<SPAN> is really meant to be used for inline purposes, not really for great chunks of HTML as you have here. <DIV> would be a better choice for that. Although if you just want to hide the table row then you could use the <TR> tag itself I guess.

Also, the syntax for hiding an element is hidden:

Code:
<TR ID="OptionsLists" STYLE="display: [COLOR=red]hidden[/color];">

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top