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

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

From: pk <philip.kluss@gmail.com>
Date: Tue Aug 30 2005 - 23:17:37 CEST

Here is my code, and it's not working. Please help me get through
this. I've read every single tutorial and you may even see remnants of
some of their variables in my code. I don't know if I'm close, but I
feel that I'm getting there.

Thanks in advance for any help. I much appreciate it.

-pk

<SCRIPT>

function able(dropdown)
{
        var myindex = dropdown.selectedIndex
        if(myindex = 1) {
                MMDiv.style.visibility='visible';
                mainform.BalStep.focus();
        }
        else {
                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.form.Finish);'>
                        <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:43 2005