Non access to specified drop down boxes

  • Thread starter Thread starter Carol Benneyworth
  • Start date Start date
C

Carol Benneyworth

Can anyone help me please?

I have created 3 drop down menu's which includes a
question in each, if my user answers No to the first
question then the other 2 boxes would be redundant.

How can I put a block on the remaining 2 questions boxes
so my user does not have access to them.

Regards

Carol
 
I think you have to create your first menu so that it loads a new page based
on the selection. Meaning one page if no, one if yes. The new pages include
the first menu along with the second menu (if yes), and whatever else you
want.
 
You can do this with JavaScript, if you can write JavaScript. Basically, you
would add an "onchange" event handler to the first dropdown box, which would
check the selectedIndex property of the dropdown to determine whether or not
to disable the other 2. Example (note, this is not something you can just
copy and paste, but you can adapt it):

<script type="text/javascript"><!--
function select_one_onchange()
{
if (select_one.selectedIndex == 0)
{
select_two.disabled = (true);
select_three.disabled = (true);
}
else
{
select_two.disabled = (false);
select_three.disabled = (false);
}
}
// --></script>

<select name="select_one" size="1" onchange="select_one_onchange()">

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
Back
Top