469,271 Members | 1,433 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

List does not allow to type text?

vikas251074
198 100+
I am using following code to create list

Expand|Select|Wrap|Line Numbers
  1.           <tr>
  2.             <td align="right">MIS No : </td>
  3.             <td>
  4.               <select name="mis_no" style="width:250px ">
  5. <%              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)")
  6.                 do while not rs.eof%>
  7.                   <option value="<%=rs("mis_no")%>"><%=rs("mis_no")%></option>
  8. <%                rs.movenext
  9.                 loop%>
  10.               </select>
  11.             </td>
  12.           </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
Jun 10 '08 #1
10 1704
DrBunchman
979 Expert 512MB
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
Jun 10 '08 #2
vikas251074
198 100+
Yes, exactly like that.

Thanks and regards,
Vikas
Jun 11 '08 #3
DrBunchman
979 Expert 512MB
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
Jun 11 '08 #4
vikas251074
198 100+
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
Jun 12 '08 #5
DrBunchman
979 Expert 512MB
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
Jun 13 '08 #6
vikas251074
198 100+
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
Jun 13 '08 #7
DrBunchman
979 Expert 512MB
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
Jun 13 '08 #8
vikas251074
198 100+
It is not useful. Anyway I will stop this thread now. I will not search any more about combo box.

Thanks and regards,
Vikas
Jun 13 '08 #9
jhardman
3,406 Expert 2GB
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
Jun 15 '08 #10
vikas251074
198 100+
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
Jun 20 '08 #11

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

16 posts views Thread by David Bear | last post: by
4 posts views Thread by John Wildes | last post: by
35 posts views Thread by Thierry Loiseau | last post: by
4 posts views Thread by jgabbai | last post: by
2 posts views Thread by =?Utf-8?B?RHJEQkY=?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.