473,378 Members | 1,384 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Is it possible to type in a new entry to a drop down list?

1
Hi,
i'm rather new at using php..and programming too. So I really need to know if it's possible for users to type in their own entries into a drop down list without getting the data from a database? If yes, how can I code that?
please help.
thanks
Jun 22 '07 #1
3 1317
Purple
404 Expert 256MB
Hi Wendy,

The quick answer to your question is no - HTML does not have a drop down list you can edit into..

That said, it doesn't mean one couldn't be written.

As a simple work around can you place a text field next to the drop down with a button to add an item to the drop down list ?

Regards Purple
Jun 22 '07 #2
shoonya
161 100+
If i am getting the question right then you need to create drop by taking option values from user and displaying them in a drop down simultaneously

you can create such thing using javascript and ajax
lemme know if i getting your query

shoonya
Jun 22 '07 #3
ronnil
134 Expert 100+
what i usually do
Expand|Select|Wrap|Line Numbers
  1. <select onchange="document.getElementById('textfield1').value=this.options[this.selectedIndex].value">
  2.     <option value="somevalue">alabel</option>
  3.     <option value="anothervalue">anotherlabel</option>
  4. </select>
  5. <input type="text" name="textfield" id="textfield1" value="" />
  6.  
[Please use CODE tags when posting source code. Thanks! --pbmods]

select won't be grabbed with the postdata since it has no name, when changing the selectbox, textfield1's value will be updated, but you're still allowed to make a new entry, then just grab the data submitted from textfield1 :)
Jun 22 '07 #4

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

Similar topics

7
by: jason | last post by:
Is there a way - possibly a disconnected rs? - to update the contents of an existing pulldown on a page without having to re-submit the page for the user to see the pulldown populated with an...
6
by: Filiz Duman | last post by:
I was just wondering, is it possible to write into the drop down box in order to jump to a specific item. The reason why I am asking is my drop down box has many items and additionally to the...
0
by: bne | last post by:
Hi All, I have a shopping cart app that (I think) has broken due to an upgrade to .NET 2.0. Some products display fine: <http://ukweddinggroup.com/default.aspx?prd=11> Others display okay...
1
by: bytesFTW99 | last post by:
I have been struggling with this for some time can anyone help out? just trying to have 3 dropdown boxes that fill depending on what is selected, then in some cases click a button and have the second...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.