GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes drop-down list / textbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "drop-down list / textbox" Watch "drop-down list / textbox" New topic
Author

drop-down list / textbox

George Brown
Ranch Hand

Joined: Sep 26, 2000
Posts: 919
I can quite happily create a textbox in HTML, or use javascript to create a drop-down list, but I'm trying to find a way to have a combination of the two without resorting to an applet.
So I want to find a way to have a textbox in which I can type free text if I click in it, with a drop-down list button directly to its right, which offers me a drop-down if I click on that.
Is this possible using a combination of HTML and javascript?
all replies are appreciated.
Chris Stehno
Ranch Hand

Joined: Feb 26, 2001
Posts: 180
DHTML and CSS are your friends. With them lies the answer to your problem. I would try overlaying the text field to cover the dropdown except for the arrow button ... and yada yada the magic happens. If you need a better head start, let me know and I will see if I can whip something up for you.
Hope this helps
------------------
Chris Stehno (Sun Certified Programmer for the Java 2 Platform)


- Chris Stehno, SCPJ
George Brown
Ranch Hand

Joined: Sep 26, 2000
Posts: 919
Chris,
I have to admit that although I'm aware that DHTML is dynamic html I'm not sure what CSS is. Web pages are not my speciality, but I need to make this work in a JSP.
Would it be possible to post a quick example that I could play around with?
many thanks,
George
 
GeeCON Prague 2014
 
subject: drop-down list / textbox