Re: A select drop-down that appears/disappears according to previous selection.
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: A select drop-down that appears/disappears according to previous selection.

From: pk <philip.kluss@gmail.com>
Date: Wed Aug 31 2005 - 00:10:16 CEST

Hmm, I wasn't very close at all. I'm still not getting it. My code
appears as follows now. There is still no observable behavior. :(

<SCRIPT type="text/javascript"> >

function able(dropdown)
{
        var myindex = dropdown.selectedIndex
        if(myindex == 1) {

document.getElementById("MMDiv").style.visibility="visible";
                document.mainform.BalStep.focus();
        }
        else
        {
                document.getElementById("MMDiv").style.visibility='hidden';
        }

</SCRIPT>

<Form Name="myform">
<tr>
<td height="7" width="177">
<div align="right"><font color="#000000" face="Comic Sans MS">Boring
Type:</font></div>
</td>
<td height="7" width="397"><div align="left"><font color=#000000
face="Comic Sans MS">

        <select name="Finish" onchange='able(this);'>
                <option></option>
                <option>Rough</option>
                <option>Finish</option>
        </select></font></div></td>

        <DIV ID="MMDiv" style="visibility:hidden">
        <LABEL FOR="BalStep">
        <SELECT name=BalStepVal>
                <option></option>
                <option>Balanced Cutting</option>
                <option>Step Cutting</option>
        </SELECT>
        </DIV>
        </FORM>
        </tr>
Received on Tue Oct 18 03:14:44 2005