Context dependant or relational list-boxes

Results 1 to 2 of 2

Thread: Context dependant or relational list-boxes

  1. #1
    Join Date
    Dec 1969

    Default Context dependant or relational list-boxes

    Hi <BR>I am trying to create a form with several drop down list-boxes. Some of the content of the boxes is dependant on the selection made in another listbox. How do I define this situation in ASP using access. I did have some code for passing all the data in a nested array but as there is a large amount of drop down options I would prefer to have the second box requery the database before updating.<BR><BR>Thank you for your help.<BR><BR>Dylan

  2. #2
    Join Date
    Dec 1969

    Default RE: Context dependant or relational list-boxes

    Well... I&#039;m not sure exactly what you want that makes this advanced. Had you been asking the opposite ("How do I do it without a return trip to the server"), then I&#039;d let you off (it&#039;s complex, but frequently asked).<BR><BR>This way round&#039;s quite easy. Have the drop-down boxes, and have each drop-down box have an onChange event handler:<BR><BR>&#060;select name="box1" onChange="doSubmit(this)"&#062;<BR> ...<BR>&#060;/select&#062;<BR>&#060;input type="hidden" name="populateBoxes" value="" /&#062;<BR>&#060;script&#062;<BR>function doSubmit(oBox){<BR> var oForm = oBox.form;<BR> oForm.populateBoxes.value =;<BR> oForm.submit();<BR>}<BR>&#060;/script&#062;<BR><BR>Then, by checking the value of that hidden (populateBoxes) field, you can see which drop-down was modified and populate the other ones accordingly...<BR><BR>Craig.

Posting Permissions

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