Welcome to Deadbeef.com
Articles and tips on software from authored by Jeremy Bettis.

Search

XML Feed RSS

What is RSS?

Who's Online?

  • Guest Users: 5

DHTML Combobox

08/04/05

Permalink 03:47:12 pm, by Jeremy Email , 305 words, 52940 views   English (US)
Categories: DHTML

DHTML Combobox

A combobox element behavior written completly in JScript. Works in Internet Explorer 5.0 and up only.

Features:

  • Element Behavior
  • Looks Good
  • Scriptable
  • Works in forms
  • Operate from Keyboard

View Sample (IE 5 only)

Pages: 1 2 3

Comments, Pingbacks:

Comment from: WIlson [Visitor]
I take this source, but this doesn't work in my browse (6.0)together other things (xml, jsp, dataisland), if I but alone its working
PermalinkPermalink 08/22/05 @ 15:10
Comment from: Jason [Visitor]
I am trying to use the combo box on an internal web page which posts data from a form. I have 3 combo boxes on the page each with unique names and IDs but when i look at the values passed to the next page i get undefined=value, where value is the correct selected value. nut the name that i give it shows up as "undefined". anyone else seen this?
PermalinkPermalink 10/06/05 @ 13:02
Comment from: Jeremy [Member] Email · http://www.deadbeef.com
I have updated the sample page to demonstrate how to use the comboboxes in a form. Please check it again.
PermalinkPermalink 10/06/05 @ 13:45
Comment from: Naga [Visitor]
can we give a flat look for this combobox
PermalinkPermalink 11/09/05 @ 07:29
Comment from: Jeremy [Member] Email · http://www.deadbeef.com
If you look at the source code, you will see that it is just a textbox with a clipped select element beside it. Put in some CSS or style attributes and see what happens!
PermalinkPermalink 11/09/05 @ 08:40
Comment from: David Zhang [Visitor]
Can this DHTML Combobox bind from a value? Just like a normal dropdownlist?
I've tried other Combobox,but it has a problem in binding a value?
PermalinkPermalink 11/10/05 @ 19:59
Comment from: Jeremy [Member] Email · http://www.deadbeef.com
Please see http://www.deadbeef.com/index.php/combobox_webcontrol for a web control based on this combobox. I assume that is what you mean when you say "bind from a value".
PermalinkPermalink 11/11/05 @ 07:44
Comment from: csrao [Visitor]
I want to stop the user from entering values other than listed, how do I do it?. I'm able to get the entered value, but unable to set focus or clear the value?
PermalinkPermalink 03/08/06 @ 23:53
Comment from: Jeremy [Member] Email · http://www.deadbeef.com
If you don't want the user to enter other choices, you don't need a combobox, just use an HTML select element. If you really want to do what you are asking for, you need to reach inside the combobox and get to.the textfield element (exposed via the textfield property).
PermalinkPermalink 03/09/06 @ 12:00
Comment from: martalex [Visitor]
How can I get the ComboBox to submit it's option value instead of the option text?
PermalinkPermalink 03/29/06 @ 22:44
Comment from: Jeremy [Member] Email · http://www.deadbeef.com
That is not how it is designed. Here is my reasoning: If you had 3 options 1=one 2=two 3=three, and the server received the value "1" how would you know if the user typed "1" or selected the option "one" ?

Perhaps it could submit both back to the server i.e. foo=one&foo_val=1 but that would require some new code. If someone wants to make that change, I will update the code here.
PermalinkPermalink 03/30/06 @ 09:06
Comment from: sunilz_kh [Visitor]
Iam not able to set focus or use the tabindex for this control. Please help me to resolve this issue.

Thanks in advance
PermalinkPermalink 05/24/06 @ 12:23
Comment from: surmad [Visitor]
How I can use the control on form.
I could not use the example.
When I saved the HTC and html in file and tried on my machine I do not see the combobox.

I also want to know, How I can call properties and method, so I can set then at runtime using javascript.

Thanks in advance.
PermalinkPermalink 06/07/06 @ 11:19
Comment from: selva [Visitor] Email
I am trying to get the selected value from combo box but its selecting the last value in the list. Help me please
PermalinkPermalink 01/23/07 @ 01:27
Comment from: Adithya [Visitor] Email · http://Adithya
How can i check if the value is selected in the combo box?I need the value selected in the combo box for further calculations.

PermalinkPermalink 02/28/07 @ 07:33
Comment from: Jeremy [Member] Email · http://www.deadbeef.com
You can peek inside and look at the SELECT and INPUT elements directly.
PermalinkPermalink 02/28/07 @ 09:47
Comment from: Rohit [Visitor] · http://www.rcolaco.com
Do you have any plans on making this work in Mozilla/Firefox?
PermalinkPermalink 04/11/07 @ 09:09
Comment from: Jeremy [Member] Email · http://www.deadbeef.com
Nope.
PermalinkPermalink 04/11/07 @ 09:20
Comment from: fox_ling [Visitor] Email · http://hi.baidu.com/fox_ling
I tried to control the size of the
textfield .Then people can't input too long string .But failed.
Can you give me some advice?
Thanks a lot.
PermalinkPermalink 06/29/08 @ 03:19
Comment from: tigersubu [Visitor] Email · http://chakrabarty.com/combobox.html
http://chakrabarty.com/pp_editable_dropdown.html
http://chakrabarty.com/combobox.html

You can try using html code for COMBOBOX in HTML available at these links. It is an Editable DropDown Listbox with any one select option as Editable (like a textbox ) and the rest as readonly.

PermalinkPermalink 07/30/08 @ 23:00
Comment from: Jeff [Visitor] · http://themagiclisting.com
How can I have any values the user enters inserted into the lsit for future reference?
PermalinkPermalink 08/11/08 @ 14:28
Comment from: covings [Visitor] Email · http://www.cornicescentre.co.uk
http://www.deadbeef.com
You can peek inside and look at the SELECT and INPUT elements directly.
really good! thx so mutch
PermalinkPermalink 09/09/08 @ 11:04
Comment from: Kathy Montoya [Visitor] Email
I want to move the combobox over to the center of the page. Can you tell me how2 to do this?
PermalinkPermalink 11/05/08 @ 14:58

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

July 2009
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Categories

powered by
b2evolution