List does not allow to type text?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikas251074
    New Member
    • Dec 2007
    • 198

    List does not allow to type text?

    I am using following code to create list

    Code:
              <tr>
                <td align="right">MIS No : </td>
                <td>
                  <select name="mis_no" style="width:250px ">
    <%              set rs = conn.execute("select a.mis_no, a.seq_no, a.lot_no, b.item_description from item_procurement_history_dtl a, item_master b where a.status = 'D' and b.item_code = a.item_code order by a.item_code, substr(mis_no, instr(mis_no, '/', -1)+1)")
                    do while not rs.eof%>
                      <option value="<%=rs("mis_no")%>"><%=rs("mis_no")%></option>
    <%                rs.movenext
                    loop%>
                  </select>
                </td>
              </tr>
    But this code does not allow user to type some text. As soon as the user types text, common list element should be displayed from oracle table in list.
    Is it possible?

    Thanks and regards,
    Vikas
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Hi Vikas,

    Do you mean that when the user types a letter the value selected in the drop down will change to the first item that begins with that letter?

    Dr B

    Comment

    • vikas251074
      New Member
      • Dec 2007
      • 198

      #3
      Yes, exactly like that.

      Thanks and regards,
      Vikas

      Comment

      • DrBunchman
        Recognized Expert Contributor
        • Jan 2008
        • 979

        #4
        In theory, it should do that already.

        Can you do an experiment and create a drop down list manually and see if it works when you try it on that? It shouldn't make any difference whether it's a database generated drop down list or a simple html one so if it works on one it should work on the other.

        Let me know what happens,

        Dr B

        Comment

        • vikas251074
          New Member
          • Dec 2007
          • 198

          #5
          Can I create such a list which allow user to type text also and display list element which is common to typed text?

          Or simply can I create such a list which only allow to user to type text.

          Thanks and regards,
          Vikas

          Comment

          • DrBunchman
            Recognized Expert Contributor
            • Jan 2008
            • 979

            #6
            Vikas, I'm still a little bit confused about exactly what you want.

            Once you type a letter on the keyboard with the focus on an html drop down list (even one generated by ASP code) the list should select the first option that begins with that letter - are you saying that your drop down isn't doing this?

            Or are you talking about a combo box where you can type text in a textbox which is also a drop down list? If so then this control cannot be created with html - there are some javascript solutions that go some way to mimicing the behaviour but I've not seen any that are perfect.

            Dr B

            Comment

            • vikas251074
              New Member
              • Dec 2007
              • 198

              #7
              Yes sir, I am talking about combo box. Thanks for suggestion. Now I think either to stop this here or try to explore in Javascript forum. Am I right, sir?

              Thankd and regards,
              Vikas

              Comment

              • DrBunchman
                Recognized Expert Contributor
                • Jan 2008
                • 979

                #8
                Yes you could give it a try there. Take a look at these first as you may find something which helps you.

                Good luck finding a solution.

                Dr B

                Comment

                • vikas251074
                  New Member
                  • Dec 2007
                  • 198

                  #9
                  It is not useful. Anyway I will stop this thread now. I will not search any more about combo box.

                  Thanks and regards,
                  Vikas

                  Comment

                  • jhardman
                    Recognized Expert Specialist
                    • Jan 2007
                    • 3405

                    #10
                    I don't think he's talking about a combo box, although that might give him the effect he wants. It sounds to me like he is asking for a text box that suggests words based on the first letter or two that he types in.

                    If this is what you are looking for, you can populate the list of options from a db using ASP but you will need a client-side technology to make the suggestions appear on the screen (this is also what DR.B. was getting at suggesting you use Java). You can probably find boiler-plate code for this using Javascript or a Java applet, but you would have to know the name for that effect in order to search for it, and I am not sure what that is called.

                    Let me know if this helps.

                    Jared

                    Comment

                    • vikas251074
                      New Member
                      • Dec 2007
                      • 198

                      #11
                      Now I think I can do this by using AJAX method.
                      I should use onkeyup() event in the input tag and then take this value and get the list display matching this entry.

                      I will try my best to do this way.

                      Thanks and regards,
                      Vikas

                      Comment

                      Working...