suppose I've a 3 options in a drop down box say red , blue, others.
If a user select option as an others then below a text box should be visible to wrtie his own favourite color.
I can populate the drop down box with colors but do not know how to bring textbox visible on selection of others in the
drop-down box. I know that using javascript it is possible to do but I am quite new to javascript. can anybody please help me
out??

its alright.. now I can understand a mistake in my question. I do not want to process a blank field. Here in this case text box is just invisible. I want it to be invisible and active in my form only in case i select others. I do not want to process a blank field because it will show an error while inserting vale in the database.
– Shashi RoyMar 9 '12 at 13:50

Sorry to chip in @Umesh... I can't get this to work because the text input negates the select options for some reason. HELP? I mean, the javascript works and everything but it won't POST the values from the drop down... only the text input
– gavinOct 25 '13 at 19:55

@gavin Did you ever resolve the issue of the text input overwriting the select as I have the same issue?
– John HigginsNov 8 '14 at 15:14

As Umesh Patil answer have comment say that there is problem.
I try to edit answer and get reject. And get suggest to post new answer.
This code should solve problem they have (Shashi Roy, Gaven, John Higgins).

Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).