Results 1 to 2 of 2

Thread: Combo boxes??....AGAIN!!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651

    Talking

    I am trying to display TWO combo boxes on my ASP Front end. I call the function to do this from VB BACK END, however only ONE combo box is displayed(instead of TWO):

    Here's my code which should generate two combo boxesMaybe the layout isnt correct??? Any suggestions?

    Public Sub sb_ListStandardJourney()

    Dim obj As New DCStrdJourneyClass
    Dim rs As New ADODB.Recordset
    Set rs = obj.fn_ListStandardJourney
    rs.Open
    g_objSC.Response.Write "<select name=select1>" & vbCrLf
    Do While Not rs.EOF
    g_objSC.Response.Write "<option value=" & rs(0) & ">" & rs(1) & "</option>" & vbCrLf
    rs.MoveNext
    Loop
    g_objSC.Response.Write "</select>" & vbCrLf

    'NOW FOR MY SECOND COMBO!..

    g_objSC.Response.Write "<select name=select2>" & vbCrLf
    Do While Not rs.EOF
    g_objSC.Response.Write "<option value=" & rs(0) & ">" & rs(1) & "</option>" & vbCrLf
    rs.MoveNext
    Loop
    g_objSC.Response.Write "</select>" & vbCrLf

    End Sub


    Then i call this function from my ASP PAGE:
    <%
    Dim obj
    set obj = server.CreateObject("UCStandardJourney.UCStrdJourneyClass")
    CALL obj.sb_ListStandardJourney
    Set obj = Nothing
    %>

    Whats the problem??????????????????????????????
    Gilly

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    The only thing I can see what could be a problem is the part where the value part of the option is filled out. is there any value of the first field that has a space in it?
    If so you need to enclose the value in single pip's

    "<OPTION value='" & rs(0) & "'>"

    This may or may not sort out your problem

    Hope it helps

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

Posting Permissions

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



Click Here to Expand Forum to Full Width