Question : Dropdown runs a query to populate checkboxes - ASP

Hello,

I have an ASP form that has a dynamic dropdown list.  I need the user's selection in the list to populate the form's checkboxes as either being checked or unchecked.

Ie.  In the admin maintenance section the admin will select from a drop down list values such as Admin, Marketing, Accounting, Finance, Sales, etc... the selection will populate checkboxes that represent their access levels, such as Full Access, Limited Access, etc..

The problem with the code that I have now is that it won't allow for a selection.  It keeps submitting the first item and won't allow the user to select any other items.





Answer : Dropdown runs a query to populate checkboxes - ASP

Hi,

  Not exactly certain what you want, but....

1) you should probably be using the onchange event handler, not the onclick event handler.  As soon as the user tries displaying the drop down, s/he is clicking -- so the selected option (if any) will be submitted.




3) Also, you probably should send the form object and the selected option's value to the function so that if the form moves from position '0' to position 'x', it doesn't crash and require a rewrite:

Random Solutions  
 
programming4us programming4us