ok this is kinda like a 2 select related, but not really..
i want to show a 2nd selecty box only if the first select box is value 6
This works great on change when you are in the form.

but if i am updating the form. it doesn't see the default value..
which is in a var called StrType
prt_type is the first select prt_prog_1 is the div id surrounding 2nd select

<script>
        $(function(){
                $("#prt_type").change(function () {
                        var val = $(this).val();
                        switch(parseInt(val)){
                        case 6:
                                $("#prt_prog_1").show();
                                break;
                        case 1: case 2: case 3: case 4: case 5: case 7: case 8: 
 case '':
                                $("#prt_prog_1").hide();
                                break;
                        }
                });
        });
</script>

i tried just doing a <cfif StrType EQ 6 > to surround the stuff that does work..
but i cant then ge t the change of states...

<!--- <cfif StrType EQ 6> --->
      <div id="prt_prog_1">
      <select name="prt_prog" id="prt_prog">
        <option value="0">Select</option>
        <option value="1" <cfif StrProg EQ 1> selected</cfif>>Elite</option>
        <option value="2" <cfif StrProg EQ 2> selected</cfif>>Preferred</option>
        <option value="3" <cfif StrProg EQ 3>
selected</cfif>>Authorized</option>
      </select>
        </div>
        <!--- </cfif> --->

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328301
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to