how to create drop down selection box with manual entry ?

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 13
Joined: Thu Oct 10, 2002 10:37 pm
Location: Ukraine

Tue Dec 17, 2002 11:31 pm

I don't remember the standard capabilities of HTML. I can advice you to use input type=text, button, select paced on another layer(div) and to show/hide that layer when ever you need.

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 824
Joined: Sun Jun 02, 2002 3:09 am

Wed Dec 18, 2002 2:48 am

you can do in the diferent way.

select drop down menu &java script

you are select new menu and there are creates input box =)

New php-forum User
New php-forum User
Posts: 31
Joined: Wed Oct 23, 2002 12:55 am

Thu Dec 19, 2002 10:22 pm

nanao550 wrote:Would it be possible for you to provide an example using javascript as you mention. I would like to see exactly what it would works like and how the code and structure would be like, and if it would be possible to apply this to php. I would like to avoid using javascript, because it can be disable by the browser.


Hi there,
here is a piece of code for the php part. I assume here that we have 3 option values and I have put a textbox to get the value for the input. The code in PHP goes like:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<form name="form1" method="post" action="put.php">
  <input name="c1" type="text" id="c1">
  <p><select name="select">
<?php echo("<option>".$c1."</option>") ?>
  <input type="submit" name="Submit" value="Submit">

Every time the user inputs a value in the textbox and then presses the button he gets a reload and update event.
Hope it helps,

Post Reply