Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 29th, 2004, 12:39 PM
Registered User
 
Join Date: Aug 2004
Location: Bangalore, Karnataka, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default enter text in dropdownlist

Hi!
I have a drop down list which I am populating from a database.
What I need to do is that when the focus is on the drop down list,
the user should be able to enter text.
Can anyone pleeease tell me how to do this?
Thanx.

Reply With Quote
  #2 (permalink)  
Old September 30th, 2004, 12:08 AM
Authorized User
 
Join Date: Jul 2004
Location: chennai, tamilnadu, India.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aravwind Send a message via Yahoo to aravwind
Default

u shall hav a listitem as "new" in ur list
on click, open a popup window with a textbox,
ok, cancel buttons.
save the item in the database and display
Reply With Quote
  #3 (permalink)  
Old September 30th, 2004, 01:40 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

This is similar one explained as above
<script type="text/javascript">
function displaytxtbox(x)
{
var displaytxtbox="txtbox"+x;
var displaytxtbox=document.all(displaytxtbox);
displaytxtbox.style.display="";
}
function removelist(x)
{
var removelist="list"+x;
var useremovelist = removelist;
var removelist=document.all(removelist);
removelist.style.display="none";
}
function zipcode(a)
{
if (a == "new") {
removelist(1);
displaytxtbox(1);
document.OrganizationForm.zip_code.value='';
}
}
</script>

<form name="OrganizationForm">
<input type="text" name="zip_code" size="4" id="txtbox1" style="display: none;">

<select name="choose_zip_code" id="list1" onChange="zipcode(this.form.choose_zip_code.value) ;return true;">

<option value="60601">60601</option>
<option value="77777">77777</option>
<option value="new">new</option>

</select>
</form>


If a user selects an existing zip code from the drop-down list, the selection just gets highlighted as normal. If they're zip code isn't listed and they click "new", the drop-down list disappears and a blank input box appears in it's place.


Gokulan Ethiraj
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Enter to jump to the next text field dimeanel Visual Basic 2005 Basics 2 April 29th, 2007 01:25 AM
enter key within text area shs BOOK: Beginning ASP.NET 1.0 0 April 12th, 2004 11:08 PM



All times are GMT -4. The time now is 07:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.