I have two drop down menus, I only want the second one to display if "NO" is selected on the first one. I've been trying a few different things but my javascript really isn't very good. So basically IF no is selected in from first drop down, THEN display <tr>... Else don't show it. And by default it should NOT show as well. Any help is greatly appreciated!
you mean the type of chain selecting dropdown? So you can view some JavaScript examples for this type of code from, my site: - Chained Selects - chain selecting dropdown
Hi there here is complete code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script language="javascript"> function setdd2() { if(document.getElementById("dropdown1").value == "no") { document.getElementById("cntdd2").style.display = "block"; } else { document.getElementById("cntdd2").style.display = "none"; } } </script> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30"><select name="dropdown1" id="dropdown1" onchange="setdd2()"> <option value="null">Select</option> <option value="yes">Yes</option> <option value="no">No</option> </select> </td> </tr> <tr> <td><div id="cntdd2" style="display:none"><select name="dropdown2" id="dropdown2"> <option value="null">Select</option> <option value="yes">Yes</option> <option value="no">No</option> </select></div></td> </tr> </table> </body> </html>