OK, here goes again...

Results 1 to 3 of 3

Thread: OK, here goes again...

  1. #1
    Jason Guest

    Default OK, here goes again...

    Sorry for the repost, but I&#039;m completely stumped here. What I&#039;m doing here is automatically populating a drop down list of Divisions with values I have stored in a database. Only the Divisions a user is allowed to view are displayed. Once a user selects one of the Divisions, I need to poulate a second drop down list with only those Projects that are currently active for that Division. <BR><BR>I looked at the examples that were provided for me before, but almost all of those involved hard coding the arrays into the page and I can&#039;t afford to do that as the projects will be changing almost daily. Is there any way to do this in ASP/Javascript? Is there a way to dynamically create the arrays perhaps?<BR><BR>Thanks for any help in advance.

  2. #2
    Join Date
    Dec 1969

    Default RE: OK, here goes again...

    You&#039;re going to have to do a database call and submit the page (this info is from a db?)<BR><BR>Then, your second dropdown will be the result of your first:<BR><BR>SELECT * FROM table WHERE something = mydropdownselection

  3. #3
    Join Date
    Dec 1969

    Default RE: OK, here goes again...

    &#060;script language="javascript"&#062;<BR>var myArr;<BR>&#060;%<BR>dim counter<BR>counter = 0<BR>do while not myRs.Eof<BR>response.write "myArr[" & counter & "]=" & myRs("somefield") & ";" & vbscrlf<BR>counter = counter+1<BR>loop<BR>%&#062;<BR><BR>if need multidimensional array then do<BR><BR>response.write "myArr[" & myCounter & "]=new array(2);" & vbcrlf<BR>response.write "myArr[" & myCounter & "][0]=" & myRs("field1") &";" & vbcrlf<BR>response.write "myArr[" & myCounter & "][1]=" & myRs("field2") &";" & vbcrlf<BR>response.write "myArr[" & myCounter & "][2]=" & myRs("field3") &";" & vbcrlf<BR><BR>etc<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