prob with check box

Results 1 to 2 of 2

Thread: prob with check box

  1. #1
    Join Date
    Dec 1969

    Default prob with check box

    hi.<BR> on my asp page, i have a table. in second last field of each row it has a combo box. and the last field contains a check box. the field of combo box are getting populated from the database. what i want to do is i want to disable the combo box at the load of the page and if clicking on check box i want the combo to be enabled.<BR> i am submitting the form on click event of the check box but i am not able to disable the combo at page load and to enable it on onclick event of chk box. please help

  2. #2
    Join Date
    Dec 1969

    Default Why do you submit the form...

    ...onClick from the check box??? When you do that, you haven&#039;t given the user a chance to choose something from the &#060;SELECT&#062;.<BR><BR>Anyway it&#039;s all simple enough:<BR><BR>&#060;INPUT Type=Checkbox Name="cb_27" onClick="this.form.sel_27.disabled=!this.checked;" &#062;<BR><BR>&#060;SELECT Name="sel_27" DISABLED&#062;<BR> &#060;OPTION&#062;...<BR>&#060;/SELECT&#062;<BR><BR>Note that this code will *RE-DISABLE* the &#060;SELECT&#062; if the box is *unchecked*. If you don&#039;t want than, then just change<BR> !this.checked<BR>to<BR> false<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts