Guru needed urgently!

Results 1 to 3 of 3

Thread: Guru needed urgently!

  1. #1
    Daphne Guest

    Default Guru needed urgently!

    I am having some difficulty displaying database records depending on selections (single and/or multiple) made from a select list box. The select box is a double-linked variety and is dynamically populated using Javascript. <BR><BR>Question:<BR>How do I pass the selected option(s) from A.asp page to B.asp page. This B.asp page will display a number of records based on what is selected from the A.asp page.<BR><BR>To make it easier for you to understand what I am talking about, please visit my page showing the select boxes, then perhaps you can point me to a script that will achieve the results I am after. <BR><BR>Thanks a lot for any help<BR>Daphne<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Goober needed urgently!

    i think i know what you want...maybe not.<BR>what i did was use 1 asp page with a select statement. ie. when the person first gets to the page it defaults to a list. then when the person selects item they are sent to the same "page" but with different content. the first list choice is called list and can then be passed by a dynamically created post and an invisible form element.<BR>does that make any sense? sorry if it doesn&#039t answer your question

  3. #3
    Ryne Guest

    Default RE: Guru needed urgently!

    When you grab the value of your list box in B.asp by using e.g.:<BR>strlist = Request.Form("yourlistboxname") <BR>you will get the value of strlist like this:<BR>"selecteditem1,selecteditem2,selecteditem 3,..." etc. depending on how many items selected.<BR>Then to separate the items (so you can display each record), use split function like this:<BR>strlist = split(strlist,",") -&#062; because each item is separated by comma.<BR>To clear the value from spaces (because I&#039m not sure whether spaces is also used to separate items) , use e.g :<BR>for i = LBound(strlist) to UBound(strlist)<BR>strlist(i) = Trim(strlist(i))<BR>next<BR>Then to access each value, use e.g :<BR>itemvalue1 = strlist(0)<BR>itemvalue2 = strlist(1)<BR>You can also use array to store all value in just one variable.<BR>Or if you want to retrieve details of certain item, use SQL like this :<BR>"SELECT * FROM TableName WHERE FieldName = &#039 & strlist(0) & "&#039"<BR>I hope that&#039s what you need to know. If you want to know more about ASP, you can go to<BR>Good luck ....<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