Forum Moderators: open
The code I have so far is....
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form name="dealerships"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><select name="selectbox" size="1" onChange="changecontent(this)">
<option selected value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select><br>
</td>
</tr>
<tr>
<td width="100%">
<!-- content to appear here -->
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<script language="JavaScript">
var thecontents=new Array()
thecontents[0]='ddd'
thecontents[1]='1'
thecontents[2]='2'
thecontents[3]='3'
function changecontent(which){
document.dealerships.contentbox.value=thecontents[which.selectedIndex]
}
document.dealerships.contentbox.value=thecontents[document.dealerships.selectbox.selectedIndex]
</script>
but I am now stuck at outputting the text.
Would appreciate it
<SPAN id="dispText"></SPAN>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<script language="JavaScript">
var thecontents=new Array()
thecontents[0]='ddd'
thecontents[1]='1'
thecontents[2]='2'
thecontents[3]='3'
function changecontent(which){
document.getElementById("dispText").innerHTML=thecontents[which.selectedIndex]
}
document.getElementById("dispText").innerHTML=thecontents[document.dealerships.selectbox.selectedIndex]
</script>