Solved

Link Three Database Driven Dropdowns

Posted on 2009-04-14
25
253 Views
Last Modified: 2013-12-25
I am attemting to create 3 dependent drop down menu items using ASP/Javascript.  So far the code below is what I have.  The drop downs are currently populating with all the data from the database.  I need to come up with a way to link them.  The information is being pulled from an access database.  

Each select box represents a different table in the attached access database.  They each have a field in column to link them in the database.  Basically I need to run the select statement and build the array after the first box is changed.  If the page reloads that is fine which I think it will have to when using asp and javascript.

The actual working code can be seen here:  http://www.nettech-solutions.com/clientdemo/testadd.asp
<%

'---create con, rec; open con

Set con = Server.CreateObject("ADODB.Connection")

Set rec = Server.CreateObject("ADODB.Recordset")

strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db/handbookDB.mdb")
 

con.Open strCon
 

'---build array-strings to be inserted in JavaScript

Function BuildClientSideArray(strSQ, strColIDName, strColValueName, intArrayNum)

    rec.Open strSQ, con
 

    strTmp = ""

    i = 0

    Do While Not rec.EOF

        strTmp = strTmp & "" _

        & "arrSel" & intArrayNum & "_ID[" & i & "] = """ & rec(strColIDName) & """;" & vbCrLf _

        & "arrSel" & intArrayNum & "_Val[" & i & "] = """ & rec(strColValueName) & """;" & vbCrLf

        

        i = i + 1

        rec.MoveNext

    Loop
 

    rec.Close

    BuildClientSideArray = strTmp

End Function
 

strArray1 = BuildClientSideArray("SELECT * FROM categories ORDER BY CATDESC", "CATCD", "CATDESC", 1)

strArray2 = BuildClientSideArray("SELECT * FROM subCategories ORDER BY CATCD", "SUBCATCD", "SUBCATDESC", 2)

strArray3 = BuildClientSideArray("SELECT * FROM records ORDER BY SUBCATCD", "RECORDID", "RECORDTITLE", 3)
 

'---close, null

con.Close

Set rec = Nothing

Set con = Nothing

%>
 

<html>

<head>
 

<script type="text/javascript">

  // initialize arrays

  arrSel1_ID = new Array();

  arrSel1_Val = new Array();

  arrSel2_ID = new Array();

  arrSel2_Val = new Array();

  arrSel3_ID = new Array();

  arrSel3_Val = new Array();

        

  // array table1

  <%=strArray1%>

       

  // array table2

  <%=strArray2%>

      

  // array table3

  <%=strArray3%>

        

  function AddDropdown(dd, txt, val) 

  {

    optn = document.createElement("OPTION");

    optn.text = txt;

    optn.value = val;

    dd.options.add(optn);

  }

        

  // fill select box 1

  function fillSel1() 

  {

    var frm = document.frm

    frm.sel1.length = 0

            

    // fill

    AddDropdown(frm.sel1,"Choose below...", "");

 

    for (i = 0; i< arrSel1_ID.length; i++) 

	  {

		  AddDropdown(frm.sel1, arrSel1_Val[i], arrSel1_ID[i]);

    }

 

    // clear the other select boxes

    frm.sel2.length = 0

    frm.sel3.length = 0

  }

       

            

  // fill select box 2

  function fillSel2() 

  {

    var frm = document.frm

    frm.sel2.disabled = false;

    frm.sel3.disabled = true;

            

    // clear

    frm.sel2.length = 0

            

    // fill

    AddDropdown(frm.sel2,"Choose below...", "");

 

    for (i = 0; i< arrSel2_ID.length; i++) 

	  {

		  AddDropdown(frm.sel2, arrSel2_Val[i], arrSel2_ID[i]);

    }

            

    // clear select box 3

    frm.sel3.length = 0

  }

            

  // fill select box 3

  function fillSel3() 

  {

    var frm = document.frm

    frm.sel3.disabled = false;

            

    // clear

    frm.sel3.length = 0

            

    // fill

    AddDropdown(frm.sel3,"Choose below...", "");

 

    for (i = 0; i< arrSel3_ID.length; i++) 

	  {

		  AddDropdown(frm.sel3, arrSel3_Val[i], arrSel3_ID[i]);

    }

  }

</script>
 
 

<style type="text/css">

.width200 {

 width: 200px;

}

</style>

</head>

<body onLoad="fillSel1()">

			 

  <form id=frm name=frm method="post" action="insert.asp">

	  <table>

		  <tr>

			  <td class="no-border" width=200>Category:</td>

			  <td class="no-border" width=204>Sub-Category:</td>

			  <td class="no-border" width=200>Record:</td>

			</tr>

			<tr>

			 	<td class="no-border" width=200>

			  	<select name="sel1" onChange="fillSel2()" size="1" " style="width: 200px"></select>

			  </td>

			  <td class="no-border" width=200>

			  	<select name="sel2" size="1" style="width: 200px" onChange="fillSel3()" disabled></select>

			  </td>

			  <td class="no-border" width=200>

			    <select name="sel3" size="1" style="width: 200px" disabled></select>

			  </td>

			</tr>

		</table>

  </form>		

</body>

</html>

Open in new window

handbookDB.mdb
0
Comment
Question by:GBTIS
  • 15
  • 10
25 Comments
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24138865
You will need to use Ajax. Not difficult... don't let it scare you.

Basically this is what happens.

The second and third drop downs are each in their own divs (Unique Id) To start with the divs contain only the

<select name="sel3" size="1" style="width: 200px" disabled></select>

When the user selects an option on the first select menu this calls a javascript which takes the ID of the selected value and passes it behind the scene to another aso file. This file calls the data connection and populates a another select menu with the correct data for the passed variable. The entire inner.html of the renders page is then passed back to the javacript which displays it in the second div. The same for hte thrid div.

Look up and play with Ajax. It  really is not complex once you get it going.

A.
0
 

Author Comment

by:GBTIS
ID: 24140238
Thanks for the reply, I know little to nothing about AJAX.  I will begin to do some research and see what I can come up with.  Do you have a good site I can look at to learn AJAX or a good starting point for what I am trying to do?
0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24140305
This is an example of a linked drop down. I made this about a year ago.

http://www.webnea.com/Register.asp

If you select a County/state the provinces within that show up in the following drop down.

I can pass you the ajax if you want.

Its something you can impliment is about 20 mins.

A:
0
 

Author Comment

by:GBTIS
ID: 24140340
That is exactly what I need just need 3 of them.  If you could pass that to me that would give me a great start.  If you say 20 minutes it will take me about 2 days!  :)  Thanks.
0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24140384

Ok... Here is come in bits.

Wait one.

A.
0
 
LVL 5

Accepted Solution

by:
Abiel de Groot earned 500 total points
ID: 24140461
Save this file as SimpleAjaxFile.js

Make a folder at root level and call it Ajax. Anew folder insides Ajax called RegAjax and save the file in that.
This preserves the links... very important

Then call the js file from your web page, as follows:

<script src="Ajax/RegAjax/SimpleAjaxFile.js" language="javascript" type="text/javascript"></script>


var CheckNickNameTimeout  = null;

var lastNickNameTest = "";
 

function GetXmlHttpObject(handler)

{ 

var objXmlHttp=null;
 

if (navigator.userAgent.indexOf("MSIE")>=0)

{ 

var strName="Msxml2.XMLHTTP";

if (navigator.appVersion.indexOf("MSIE 5.5")>=0)

{

strName="Microsoft.XMLHTTP";

} 

try

{ 

objXmlHttp=new ActiveXObject(strName);

objXmlHttp.onreadystatechange=handler;

return objXmlHttp;

} 

catch(e)

{ 

alert("Error. Scripting for ActiveX might be disabled");

return;

} 

} 

if (navigator.userAgent.indexOf("Mozilla")>=0)

{

objXmlHttp=new XMLHttpRequest();

objXmlHttp.onload=handler;

objXmlHttp.onerror=handler;

return objXmlHttp;

}

}
 

function clearPendingNickNameTest()

{

        if (CheckNickNameTimeout != null)

        {

                clearTimeout(CheckNickNameTimeout);

                CheckNickNameTimeout = null;

        }

}

 

function initCheckNickName(PassedVar,toUrl,divID)

{

        clearPendingNickNameTest()

        CheckNickNameTimeout = setTimeout(function(){GetCustomer(PassedVar,toUrl,divID);}, 1000);

}

 

function GetCustomer(PassedVar,toUrl,divID)

{        

        //Clear timeout to prevent multiple checks when field loses focus

        clearPendingNickNameTest()

        

        //See whether choice has changed since last test

        if (lastNickNameTest != PassedVar)

        {

                lastNickNameTest = PassedVar;

                

				var url= toUrl + encodeURIComponent(PassedVar) ;
 

               // var url= toUrl + PassedVar ;

 

				xmlHttp=GetXmlHttpObject( function(){stateChanged(divID);} );

				xmlHttp.open("GET", url , true);

				xmlHttp.send(null);

        }

}
 

function DelIg_Pics(PassedVar,toUrl,divID)

{        

    			var url= toUrl + encodeURIComponent(PassedVar) ;
 

               // var url= toUrl + PassedVar ;

 

				xmlHttp=GetXmlHttpObject( function(){stateChanged(divID);} );

				xmlHttp.open("GET", url , true);

				xmlHttp.send(null);

}

 

function stateChanged(divID_TG) 

{ 

	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

	{

		document.getElementById(divID_TG).innerHTML=xmlHttp.responseText;

	}

}

Open in new window

0
 
LVL 5

Assisted Solution

by:Abiel de Groot
Abiel de Groot earned 500 total points
ID: 24140527
This is the first select menu. You need to populate this with your first options.

A:
                            <select name="selRegions" id="selRegions" onchange="GetCustomer(this.value,'Ajax/Provinces.asp?RegionID=','ListProvinces');">

                            </select>

Open in new window

0
 
LVL 5

Assisted Solution

by:Abiel de Groot
Abiel de Groot earned 500 total points
ID: 24140562
Place this div on the page. It displays the disabled second listmenu. The javascript I passed you earlier will populate this with a list it is passed.

A.
<div id="ListProvinces">

<select name="sel2" size="1" style="width: 200px" onChange="fillSel3()" disabled></select>

</div>  

Open in new window

0
 
LVL 5

Assisted Solution

by:Abiel de Groot
Abiel de Groot earned 500 total points
ID: 24140617
Last Bit.

Save this file to your Ajax folder.

You need to amend the actual ASP to popluate your second drop down.

Once this is working you can do the same (You have the structure already there) for the third drop down.

A:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<% Option Explicit %>

<%

Dim ArrProvinces
 

strSQL = "usp_ReturnRelevantProvinces " & NumRegionID & ""

Set rsData = MyConn.Execute(strSQL)

If Not rsData.EOF Then

ArrProvinces = rsData.GetRows()

End If

rsData.Close

MyConn.Close

Set rsData = Nothing

Set MyConn = Nothing
 

%>

<select name="selProvince" >

<option value="0" selected>Select</option>

<%

If IsArray(ArrProvinces) Then 

For Fi = 0 To Ubound(ArrProvinces,2)

%>

<option value="<%=ArrProvinces(0,Fi)%>"><%=ArrProvinces(1,Fi)%></option>

<%

Next

End If

%>

</select>

Open in new window

0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24140627
I would like to point out that the Javascript is not my person work. I did amend it somewhat but cannot lay claim to it as teh author.

Abiel M de Groot Sanders
0
 
LVL 5

Assisted Solution

by:Abiel de Groot
Abiel de Groot earned 500 total points
ID: 24140792
Let me explain it a bit more:
------------------------------------------------
<select name="selRegions" id="selRegions" onchange="GetCustomer(this.value,'Ajax/Provinces.asp?RegionID=','ListProvinces');">
</select>
------------------------------------------------
This is your first dropdown. Populate it with the first set of option. When a user selects an option the onchange() function calls the JS function within the first file I sent you and passes 3 parameteres/Values.

1. The selected value. This will be passed to the asp page so that we know how to populate the second drop down.
2. The URL of the asp page the JS needs to pass the variable to with a querystring.
3. The name of the div in which we want the second dropdown to appear.

Just for now, to see it working, in sorts, simply write "ok so far" on the asp page, but within the HTML code

Now when you select an option this is what will apear within the <div>

I hope this helps you.

Kind regards

Abiel M de Groot Sanders


---------------------------------------------------
0
 

Author Comment

by:GBTIS
ID: 24141118
I did manage to get the "Ok So Far" to output in place of the second drop down.  Now I will get to working on it outputting a drop down and then on to the third drop down.  I'll keep you posted.  Thanks for the good start.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24141187
Great that means it has found the asp page.

All you need to do now is collect the passed variable in the querystring. Collect the second menu data and populate it on the HTM of the asp page.

Do not worry about style sheets, javascript etc. These will be applied from the page within which the div resides.

A.
0
 

Author Comment

by:GBTIS
ID: 24141345
How do I collect the variable in the querystring?  And also, how do I tell the select box which field to use for the value and which to use for the text of the drop down menu?
0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24141410
Querystring
---------------------------------------
Dim MyValue
MyValue = Request.Querystring("RegionID")

Test this as follows.

Response.write(MyValue)
---------------------------------------

>>And also, how do I tell the select box which field to use for the value and which to use for the text of the drop down menu?

That depends on how you are collecting your data.

A:
0
 

Author Comment

by:GBTIS
ID: 24141661
I used the code you had given me for the asp to collect the data.  The code select the correct records but I need another column from the table displayed from what is currently displayed.  

This is what I have:
<%

Dim ArrProvinces

Dim MyValue
 

MyValue = Request.Querystring("RegionID")
 

Set MyConn = Server.CreateObject("ADODB.Connection")

strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../db/handbookDB.mdb")

MyConn.Open strCon

 

strSQL = "SELECT SUBCATCD, SUBCATDESC FROM subCategories WHERE CATCD=""" & MyValue & """ ORDER BY CATCD"
 

Set rsData = MyConn.Execute(strSQL)

If Not rsData.EOF Then

ArrProvinces = rsData.GetRows()

End If

rsData.Close

MyConn.Close

Set rsData = Nothing

Set MyConn = Nothing

 

%>

<select name="selProvince" >

<option value="0" selected>Select</option>

<%

If IsArray(ArrProvinces) Then 

For Fi = 0 To Ubound(ArrProvinces,2)

%>

<option value="<%=ArrProvinces(0,Fi)%>"><%=ArrProvinces(1,Fi)%></option>

<%

Next

End If

%>

</select>

Open in new window

0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24141739
Add whatever you need here.

SELECT SUBCATCD, SUBCATDESC

Just remember the order the come in

A.
0
 

Author Comment

by:GBTIS
ID: 24142249
Ok, I have the second drop down populating correctly and it works like a charm, thank you.  Now on to the third drop down.  I copied the ASP file and gave it a new name and made the necessary changes in it for the third drop down but the second asp page does not seem to be getting called when the second select box is changed.  Below is the code that makes up the second and third select drop downs maybe you can see what is wrong.  You can see the code in action here:  http://www.nettech-solutions.com/clientdemo/testadd.asp
<html>

<head>

<script src="Ajax/RegAjax/SimpleAjaxFile.js" language="javascript" type="text/javascript"></script>
 

<style type="text/css">

.width200 {

 width: 200px;

}

</style>

</head>

<body>

	 

  <form id=frm name=frm method="post" action="insert.asp">

	  <table>

	  	<tr>

			  <td class="no-border" width=200>Category:</td>

			  <td class="no-border" width=204>Sub-Category:</td>

			  <td class="no-border" width=200>Record:</td>

			</tr>

			<tr>

			 	<td class="no-border" width=200>

			 		<select name="selCat" id="selCat" onchange="GetCustomer(this.value,'Ajax/FillSelect2.asp?CATCD=','ListSubCat');">

			 			<option value="0">Choose below...</option>

            <% 

              Do While not rsRecordSet.EOF

            	  Response.Write ("<option value=" & rsRecordSet("CATCD") & ">" & rsRecordSet("CATDESC") & "</option>") 

                rsRecordSet.MoveNext

              Loop

              'Reset server objects

              rsRecordSet.Close

              Set rsRecordSet = Nothing

              Set adoCon = Nothing 

            %>

          </select>

			  </td>

			  <td class="no-border" width=200>

			  	<div id="ListSubCat">

            <select name="selSubCat" id="selSubCat" onchange="GetCustomer(this.value,'Ajax/FillSelect3.asp?SUBCATCD=','ListRecord');" size="1" style="width: 200px" disabled></select>

          </div> 

			  </td>

			  <td class="no-border" width=200>

			  	<div id="ListRecord">

			      <select name="selRecord" id="selRecord" size="1" style="width: 200px" disabled></select>

			    </div>

			  </td>

			</tr>

		</table>

  </form>		

</body>

</html>

Open in new window

0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24142337
>>I copied the ASP file and gave it a new name and made the necessary changes

You don't need to do that... this is dynamic. The same asp file wil do. It is passed a variable which tell is what to create. This time what it creates needs to be placed in the 2nd div. Have you done that? give it a unique name pass that name by javascript.

thats all.

A.
0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24142381
------------------------------------------------
<select name="selRegions" id="selRegions" onchange="GetCustomer(this.value,'Ajax/Provinces.asp?RegionID=','ListProvinces');">
</select>
------------------------------------------------

Make sure the second list box has this... calling the exact same function, only this time have it populate your second div.

A.

 You are getting there... 20 minute man!!

A.

You were right about that 2 hours thing!

A.
0
 

Author Comment

by:GBTIS
ID: 24142739
Ok I have them both calling the same asp page.  I had to add another variable in the query string and do a Case Statement because I was doing the select statements in the asp apge.  Below is the code for the html page that I have that is called testadd.html I will post the asp page next.  The page can be viewed here:  http://www.nettech-solutions.com/clientdemo/testadd.asp


<%

'Dimension variables

Dim adoCon        'Holds the Database Connection Object

Dim rsRecordSet   'Holds the recordset for the records in the database

Dim strSQL        'Holds the SQL query for the database
 

'Create an ADO connection object 

Set adoCon = Server.CreateObject("ADODB.Connection") 
 

'Set an active connection to the Connection object using a DSN-less connection 

adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db/handbookDB.mdb")

'"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & Server.MapPath("db/handbookDB.accdb")
 

'Create an ADO recordset object 

Set rsRecordSet = Server.CreateObject("ADODB.Recordset") 
 

'Initialise the strSQL variable with an SQL statement to query the database 

strSQL = "SELECT * FROM categories ORDER BY CATDESC"
 

'Open the recordset with the SQL query 

rsRecordSet.Open strSQL, adoCon

%>
 

<html>

<head>

<script src="Ajax/RegAjax/SimpleAjaxFile.js" language="javascript" type="text/javascript"></script>
 

<style type="text/css">

.width200 {

 width: 200px;

}

</style>

</head>

<body>

	 

  <form id=frm name=frm method="post" action="insert.asp">

	  <table>

	  	<tr>

			  <td class="no-border" width=200>Category:</td>

			  <td class="no-border" width=204>Sub-Category:</td>

			  <td class="no-border" width=200>Record:</td>

			</tr>

			<tr>

			 	<td class="no-border" width=200>

			 		<!--First Select Box-->

			 		<select name="selCat" id="selCat" onchange="GetCustomer(this.value,'Ajax/FillSelect.asp?MENU=selCat&SEL=','ListSubCat');">

			 			<option value="0">Choose below...</option>

            <% 

              Do While not rsRecordSet.EOF

            	  Response.Write ("<option value=" & rsRecordSet("CATCD") & ">" & rsRecordSet("CATDESC") & "</option>") 

                rsRecordSet.MoveNext

              Loop

              'Reset server objects

              rsRecordSet.Close

              Set rsRecordSet = Nothing

              Set adoCon = Nothing 

            %>

          </select>

			  </td>

			  <td class="no-border" width=200>

			  	<div id="ListSubCat">

			  		<!--Second Select Box-->

            <select name="selSubCat" id="selSubCat" onchange="GetCustomer(this.value,'Ajax/FillSelect.asp?MENU=selSubCat&SEL=','ListRecord');" size="1" style="width: 200px" disabled></select>

          </div> 

			  </td>

			  <td class="no-border" width=200>

			  	<div id="ListRecord">

			  		<!--Third Select Box-->

			      <select name="selRecord" id="selRecord" size="1" style="width: 200px" disabled></select>

			    </div>

			  </td>

			</tr>

		</table>

  </form>		

</body>

</html>

Open in new window

0
 

Author Comment

by:GBTIS
ID: 24142743
Here is the asp code I have so far:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<%

Dim ArrFill

Dim MyValue

Dim Menu
 

MyValue = Request.Querystring("SEL")

Menu = Request.Querystring("MENU")
 

Set MyConn = Server.CreateObject("ADODB.Connection")

strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../db/handbookDB.mdb")

MyConn.Open strCon
 

Select Case Menu

	Case "selCat"

    strSQL = "SELECT SUBCATCD, SUBCATDESC FROM subCategories WHERE CATCD=""" & MyValue & """ ORDER BY SUBCATDESC"

  Case "selSubCat"

    strSQL = "SELECT RECORDID, RECORDTITLE FROM records WHERE SUBCATCD=""" & MyValue & """ ORDER BY RECORDTITLE"

End Select
 

Set rsData = MyConn.Execute(strSQL)

If Not rsData.EOF Then

ArrFill = rsData.GetRows()

End If

rsData.Close

MyConn.Close

Set rsData = Nothing

Set MyConn = Nothing

 

%>

<select size="1" style="width: 200px" name="selSubCat" >

<option value="0" selected>Choose Below...</option>

<%

If IsArray(ArrFill) Then 

For Fi = 0 To Ubound(ArrFill,2)

%>

<option value="<%=ArrFill(0,Fi)%>"><%=ArrFill(1,Fi)%></option>

<%

Next

End If

%>

</select>

<style type="text/css">

.width200 {

 width: 200px;

}

</style>

Open in new window

0
 

Author Comment

by:GBTIS
ID: 24147794
Got it figured out, when the second drop down was getting created in the asp page the onchange event was being dropped.  Added another Case statement in to create the select file.  Here is how the asp page finished out.  Thank you for all your help.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<%

Dim ArrFill

Dim MyValue

Dim Menu
 

MyValue = Request.Querystring("SEL")

Menu = Request.Querystring("MENU")
 

Set MyConn = Server.CreateObject("ADODB.Connection")

strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../db/handbookDB.mdb")

MyConn.Open strCon
 

Select Case Menu

	Case "selCat"

    strSQL = "SELECT SUBCATCD, SUBCATDESC FROM subCategories WHERE CATCD=""" & MyValue & """ ORDER BY SUBCATDESC"

  Case "selSubCat"

    strSQL = "SELECT RECORDID, RECORDTITLE FROM records WHERE SUBCATCD=""" & MyValue & """ ORDER BY RECORDTITLE"

End Select
 

Set rsData = MyConn.Execute(strSQL)

If Not rsData.EOF Then

ArrFill = rsData.GetRows()

End If

rsData.Close

MyConn.Close

Set rsData = Nothing

Set MyConn = Nothing 

%>
 

<%

Select Case Menu

	Case "selCat" %>

    <select onchange="GetCustomer(this.value,'Ajax/FillSelect.asp?MENU=selSubCat&SEL=','ListRecord');" size="1" style="width: 200px" name="selSubCat" >

<%Case "selSubCat" %>

    <select size="1" style="width: 200px" name="selRecord" >

<%End Select%>

<option value="0" selected>Choose Below...</option>

<%

If IsArray(ArrFill) Then 

For Fi = 0 To Ubound(ArrFill,2)

%>

<option value="<%=ArrFill(0,Fi)%>"><%=ArrFill(1,Fi)%></option>

<%

Next

End If

%>

</select>

Open in new window

0
 

Author Closing Comment

by:GBTIS
ID: 31569903
Thank you!
0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24147829
You are most welcome.

Well done!

Kind regards

Abiel M de Groot Sanders
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Classic ASP, Search Recordset on pick list change 1 40
using Access 8 52
Adding to a VBA? 6 48
vb6 connector to mongodb 2 26
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now