Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > HTML / XHTML
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 06-16-2004, 08:28 PM
  #1
allanm
Myrmidon (Level 12)
 
Join Date: Jun 2003
Location: Australia
Posts: 165
iTrader: (0)
allanm is on a distinguished road
Free text drop-down list

Hi

Does anyone know if you can have a drop down list (<SELECT) element) which can also be free text?

I.e. if you're presenting a list of possible options to the user which they can select. Alternatively, they don't select any and simply type some free text into the box...kinda like the way Internet Explorer shows your previous websites when you type something into the address bar.

Thanks!
allanm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 06-16-2004, 11:38 PM
  #2
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 33,174
iTrader: (0)
scoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of lightscoutt is a glorious beacon of light
only with dhtml.

I had a real good example but the site has been shut down.

other than tha tno, you can't do it.
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01,
HTML 5, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 06-16-2004, 11:48 PM
  #3
coothead
~ bald headed old fart ~
 
coothead's Avatar
 
Join Date: Aug 2003
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 13,323
iTrader: (0)
coothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond reputecoothead has a reputation beyond repute
Hi there allanm,

Here is something that I put together a while ago.
It can be modified to suit your needs.
Code:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta content="mshtml 6.00.2800.1264" name="generator" />
<title>select box</title>
<style type="text/css">
<!--
body
    {
     background-color:#aaaaff;
    }
div#pick
    {
     position:absolute;
     left:25%;
     top:15%;
     width:165px;
     padding:25px 0 25px 0;
     border:solid 1px #000000;
     background-color:#ffffff;
     text-align:center;
    }
select, input, button
    {
     width:115px;
     text-align:center;
     }
//-->
</style>
<script type="text/javascript">
<!--
function choice(obj) {
  var choice= document.getElementById("two").value;
     document.getElementById("one").innerHTML=choice;
     document.getElementById('two').style.visibility="hidden";
     obj.style.visibility="hidden";
}
//-->
</script>
</head>
<body>
<div id="pick">
<form action="">
<div>
<select >
<option >one</option>
<option >two</option>
<option id="one"></option>
</select>
<input id="two"type="text"value="your choice here"/> 
</div>
</form>
<button onclick="choice(this);">
press this
</button>
</div>
</body>
</html>
__________________
coothead is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 06-17-2004, 12:19 AM
  #4
allanm
Myrmidon (Level 12)
 
Join Date: Jun 2003
Location: Australia
Posts: 165
iTrader: (0)
allanm is on a distinguished road
Thanks coots and scoutt! I'll give coothead's code a try.
allanm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 08:13 AM.

   

Mascot team created by Drawshop.com | Web Hosting

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.