codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Retaining variables  nickspick at 10:43 on Friday, December 12, 2003
 

Here’s what I've got:
I’ve got 2 <select> dropdowns. For each <option> in the top dropdown a 2nd dropdown is loaded but is hidden using CSS. On changing the top dropdown the requested 2nd dropdown is displayed [style.visibility = 'visible']. The only way I have been able to get the other dropdowns to disappear is to disable them and also set them to be hidden using javascript.

My problem:
This works, but the trouble with it is that it means with a lot of 2nd dropdowns you need many rows of JavaScript, 1 to hide/disable each 2nd dropdown. My idea to get around this is to somehow store the value of the currently displayed dropdown as a variable and then reference this to hide it when another selection is made from the 1st dropdown.
I can’t seem to retain the value of the variable though.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  XML- Passing parameters are Latitude and Longitude.
•  Re: Format Date time issue....
•  Re: How to freeze the web page when displaying progress bar?
•  Re: Help! IFrames!
•  Re: Help: Trouble with z-Index and SELECT lists
•  Re: HOW CREATE LINE CHARTS IN ASP.NET
•  How to store and retrieve document into database
•  Re: text field multiple
•  Re: after updation of a table open another program .. need help


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005