Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 10th, 2008, 11:39 AM
Authorized User
 
Join Date: Nov 2007
Posts: 54
Thanks: 1
Thanked 0 Times in 0 Posts
Default no default value for drop down

is there a way of setting no value for a drop down list? By defualt it takes the first element, I want no value to be selected.
Can I get some help here?

 
Old June 10th, 2008, 12:16 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Why not just add a blank element?
<select>
  <option></option>
</select>

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 
Old June 10th, 2008, 12:28 PM
Authorized User
 
Join Date: Nov 2007
Posts: 54
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks!!!
it is working for now.

 
Old June 10th, 2008, 01:13 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You're welcome. =]

-Doug

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting default value in drop down. rupen Classic ASP Basics 4 July 3rd, 2014 02:00 AM
drop down default value MunishBhatia ASP.NET 2.0 Professional 4 September 5th, 2007 10:31 AM
drop default constarint adesh mishra SQL Language 1 August 25th, 2006 05:43 AM
Setting default for select (drop-down) box Dave Brown Beginning PHP 1 August 10th, 2005 02:16 PM
select a default value in a drop-down list crmpicco HTML Code Clinic 2 January 20th, 2005 08:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.