Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dropdown problem

Status
Not open for further replies.

vonnegut

Programmer
Jul 15, 2004
11
US
I have this webpage for which I want to implement a dropdown.This dropdown will display all the stuff in my itenary.Now what I want to do is that for selective items in the dropdown to be clickable(I am doing the filtering using regular expressions) and for the other entries in my drop down I want that when the user clicks on it,it shouldn't do anything.That is it shouldn't collapse with the name highlighted.The dropdown should be plain inactive with no visible changes.I was thinking if there was some way to do it using Javascript?
 
I think it would be better to clarify my previous post a little bit.What I really want to do is that whenever an illegal entry in the drop down is clicked,I don't want the drop down to collapse with the value showing through the window.I hope this clarifies my problem a bit.
 
Is it theoritically possible to stall the drop doen action based on an event?Any help would be appreciated.
 
What you are proposing is not possible. You can not change the default functionality of a dropdown box like that (unless you created your own drop down box with css, which is way harder, I don't suggest it)

However, what you can do is add/remove elements from your dropdown box to reflect only valid entries. Read these following faqs about dynamic dropdown boxes from the tek-tips javascript faqs (which you can visit by clicking the faq tab above)

faq216-4766
faq216-344
faq216-335

-kaht

banghead.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top