Jump to content

List box


rashmi_k28

Recommended Posts

If I select status as R then in the list box Names I have to move bbb under optgroup No Values and disable it.

 

<HTML><BODY bgColor=#cfe8f5 leftMargin=0 topMargin=0>
<FORM name=search action=/search.php method=get><INPUT 
type=hidden value=0 name=st_index> 
<DIV style="WIDTH: 980px; TOP: 20px" align=center>

</DIV>
<DIV style="WIDTH: 980px; TOP: 20px" align=center>
  <TABLE cellSpacing=8 cellPadding=0 border=0>
    <TBODY> 
    <TR> 
      <TD align=left><LABEL><FONT face=Arial color=#006699>Status </FONT></LABEL></TD>
      <TD align=left><LABEL><FONT face=Arial color=#006699>: </FONT></LABEL></TD>
      <TD align=left> 
        <!-- set the value of status to that of submitted by the user -->
        <SELECT 
      name=status>
          <OPTION value=-- selected>-- 
          <OPTION 
        value=R>R 
          <OPTION value=C>C 
          <OPTION value=S>S 
          <OPTION 
        value=Q>Q</OPTION>
        </SELECT>
      </TD>
    </TR>
    <TR> 
      <TD align=left><LABEL><FONT face=Arial color=#006699>Name </FONT></LABEL></TD>
      <TD align=left><LABEL><FONT face=Arial color=#006699>: </FONT></LABEL></TD>
      <TD align=left> 
        <SELECT 
      onchange="if(this.options[this.selectedIndex].state=='disabled') this.selectedIndex=0" 
      name=names>
          <OPTION value=-- selected>-- 
                  <OPTION value=aaa>aaa</OPTION>
          <OPTION 
        value=bbb>bbb</OPTION>
          <OPTGROUP 
        label="No Values">
		<OPTION value=ccc>ccc</OPTION>
          <OPTION 
        value=ddd>ddd</OPTION>
			</OPTGROUP> 
        </SELECT>
      </TD>
    </TR>
    <TR> 
      <TD></TD>
      <TD align=right> 
        <INPUT type=submit value="View" name=submit>
      </TD>
      <TD align=left> 
        <INPUT type=reset value=Reset>
      </TD>
    </TR>
    </TBODY> 
  </TABLE>
<HR>
</FORM></BODY></HTML>

Link to comment
https://forums.phpfreaks.com/topic/100617-list-box/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.