print "Content-type:text/html\n\n"; print << 'JavaScript'; <script language='javascript'> function alertselected(selectobj){ ss=selectobj.selectedIndex if(ss == 2){ document.getElementById('new').style.display='block'; } else{ document.getElementById('new').style.display='none'; } } </script> JavaScript print "<html><body><form name=frm1>"; print "<select name=os onChange='alertselected(this)'> <option value='redhat'>Redhat</option> <option value='centos'>Centos</option> <option value='others'>Others</option> </select>"; print "<input id=new type=text name=newos style='display: none;'></for +m></body></html>";
In reply to Re: How do I display a textbox only if a certain value is selected from a dropdown list
by sanku
in thread How do I display a textbox only if a certain value is selected from a dropdown list
by wishartz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |