473,386 Members | 1,726 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,386 software developers and data experts.

Change colour of alternate Item in drop down

I have dozens of drop down list in my application.Now i want to add a style to drop down that evey alternate item in drop down should be of red color ...

I dont want to iterate drop down every time.
Can any one suggest me a way to do that by stylesheet or any other method.

Thanx In advance
Oct 10 '08 #1
3 1135
nateraaaa
663 Expert 512MB
You can use javascript to accomplish this. See the link below.
http://www.jsr.communitech.net/dropdowncss.htm

Nathan
Oct 10 '08 #2
Thanx ,
But i m binding my dropdown at runtime ,by getting data from databse
Oct 13 '08 #3
Plater
7,872 Expert 4TB
You might be able to iterate through the items and apply a CSS style to every other one?
Oct 13 '08 #4

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

Similar topics

7
by: Matt B | last post by:
I have a need to alternate output row colour where not every row in the sequence is output, so I cannot base the colour on whether position() is odd or even. e.g. .... <xsl:for-each...
2
by: Scott | last post by:
Is it possible to have a button change colour OnClick ? Thanks.
4
by: littlevikinggirl | last post by:
I am writing an inventory database and want to change / filter the options shown by a Combo Box / Drop down list. On a single form first the user is to select a "Hardware Item" (Radio, Pod,...
0
by: satish | last post by:
I have a table with two columns field1 int,Field2 and added a column to datagrid on runtime sum (field1+field2) ,upon changing the data in either of the fileds the sum field or column too changes ....
0
by: cybersavvy | last post by:
i wanna change the background colour of the selected item which is blue by default,i wanna make it green,please tell me the attribute of select tag which would do that,i also wanna change the font of...
1
by: gubbachchi | last post by:
Hi, How can I get the selected item of the drop down box into a php variable in the same page. The options in drop down box are A,B and C and the code is here <select> <option value="Item...
1
by: bytenut | last post by:
I would like to display two field values in a combo after selecting from the list items... i.e. my drop-down shows two fields from a lookup, but when I select the item, only the first field value is...
4
by: ari | last post by:
I have recently upgraded from vb.net 2002 to 2005, and have encountered the following problem. I have a listview with say a dozen items. Following a user action I programmatically update the...
0
by: govind161986 | last post by:
Is there a way to show an "Alternate Text" for the options of Drop Down on "Mouse Over" event. ALT Tag is used for this purpose for images but it does not work for Drop Down's. I have tried...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.