drop down menu / form

Good evening to all… I am creating a form for people to contact me - one of the pieces of info that i am asking for, is type of business… what i would like to add - is a drop down menu that activates anther when a specific business is selects.to then move over and choose a more specific type of office.
can this be done??? or do I just put 2 lists - with type of office over one list

Julie


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This can be done using JavaScript. In broad terms, you would write a function that gets called each time the first picker changes, and then decides whether or not to show a (hidden) second picker based on the result of that test.

Using Prototype, this could be as simple as this:

<script type="text/javascript">
document.observe('dom:loaded',function(){
    $('secondPickerId').hide();
    $('firstPickerId').observe('change',function(evt){
        if ($F(this) == 'some value') {
            $('secondPickerId').show();
        }else{
            $('secondPickerId').hide();
        }
    });
});

You would lay out your page with both pickers showing, then when the page loads in a browser, the second picker would be hidden before the rest of the page even displays on screen. Anyone who has disabled JavaScript would see both pickers, but then they have larger issues anyway.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ooops! Forgot my closing script tag.

</script>

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options