logo
Previous Thread
Next Thread
Print Thread
#145139 09/06/04 01:24 PM
Joined: Sep 2004
Posts: 3
jvj26 Offline OP
Newbie
OP Offline
Newbie
Joined: Sep 2004
Posts: 3
I am working on a search page and using asp array but it doesn't seem to work for me. Can someone please help. Thanks in advance.

Dim A, B, title, titleset

A = array("Receptionist", "Front desk clerk", "Customer service Assistant")
B = array("Data entry clerk", "Computer Operator")

Select Case title
case "Receptionist"
titleset = Join(A,",")
case "Data entry clerk"
titleset = Join(B,",")
End Select

Basically, what I am trying to do is I have a drop down menu(first page)from which I select "receptionist", will like to show all the related titles in the result page(second page) such as receptionist, Front desk clerk, customer service assistant which i have stored in the database. This is a database driven search.

When I do a response.write to see the titleset values, it is showin empty. I feel the problem is in the array, maybe I am not defining the array properly. Should I have define array as follows:

Dim A(2), B(1)

A(0) = "Receptionist"
A(1) = "Front Desk Clerk"
A(2) = "Customer Service Assistant"

B(0) = "Data Entry Clerk"
B(1) = "Computer Operator"

Select Case title
case "Receptionist"
titleset = Join(A)
case "Data Entry clerk"
titleset = Join(B)
End Select

Please can someone come forward to help my problem.

Sponsored Post Advertisement
#145140 09/16/04 04:51 AM
Joined: Jan 2004
Posts: 22,934
Likes: 4
BellaOnline Editor
Highest Posting Power Known to Humanity
Offline
BellaOnline Editor
Highest Posting Power Known to Humanity
Joined: Jan 2004
Posts: 22,934
Likes: 4
You're doing a case on title but I don't see that you ever give title any value. Always use response.write in your code so you can troubleshoot problems like that.


Lisa Shea, Low Carb and Video Games Editor
Low Carb Forum
#145141 09/18/04 07:29 PM
Joined: Sep 2004
Posts: 3
jvj26 Offline OP
Newbie
OP Offline
Newbie
Joined: Sep 2004
Posts: 3
Thankyou.

#145142 10/10/04 01:22 PM
Joined: Sep 2004
Posts: 6
Newbie
Offline
Newbie
Joined: Sep 2004
Posts: 6
Hi,

Here's a small change in your code. title=B(0) takes on the value in your first B array. You could of course have used A(0) to get the first A array entry.

Dim A, B, title, titleset

A = array("Receptionist", "Front desk clerk", "Customer service Assistant")
B = array("Data entry clerk", "Computer Operator"). Also add the Response.Write if you want to see the result.

title=B(0) 'title read a value A(0) or B(0).

Select Case title
case "Receptionist" :
titleset = Join(A,",")
Response.Write(titleset) 'Display the A array.
case "Data entry clerk" :
titleset = Join(B,",")
Response.Write(titleset) 'Display the A array.

End Select


Moderated by  Lisa LowCarb 

Link Copied to Clipboard
Brand New Posts
Make It Sew Easier
by Cheryl - Sewing Editor - 03/27/24 04:34 PM
2024 - on this day in the past ...
by Mona - Astronomy - 03/27/24 01:31 PM
Planner Template Kit - Weekly Layout Template
by Digital Art and Animation - 03/26/24 07:39 PM
Planner Template Kit - Yearly Layout Template
by Digital Art and Animation - 03/26/24 07:37 PM
How to Use Digital Planner Template Kit
by Digital Art and Animation - 03/26/24 07:36 PM
Review - 20 Illustrator Color tips Helen Bradley
by Digital Art and Animation - 03/26/24 07:32 PM
March Equinox to June Solstice
by Mona - Astronomy - 03/26/24 12:27 PM
Hobotrader unleashes never seen opportunity with i
by Jamal molla - 03/26/24 11:55 AM
Psalm for the day
by Angie - 03/25/24 09:05 AM
Genealogy, Sort of
by Angie - 03/24/24 05:39 PM
Sponsor
Safety
We take forum safety very seriously here at BellaOnline. Please be sure to read through our Forum Guidelines. Let us know if you have any questions or comments!
Privacy
This forum uses cookies to ensure smooth navigation from page to page of a thread. If you choose to register and provide your email, that email is solely used to get your password to you and updates on any topics you choose to watch. Nothing else. Ask with any questions!


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2022 Minerva WebWorks LLC. All rights reserved.


Powered by UBB.threads™ PHP Forum Software 7.7.5