Hello everyone,
So yesterday I figured out the JavaScript for my two selects. In the JS code 
below I have the information I need, Resort Name and Resort ID:

<script type = "text/javascript">
                        function setOptions(opt) { 
                        var resortID = document.adminForm.resortID; 
                        resortID.options.length = 0; 
                        
                        if ((opt == "0") || (opt == "1")){
                        resortID.options[resortID.options.length] = new 
Option(""); 
                        }
                        
                        if ((opt == "2") || (opt == 2)) { 
                        <cfoutput query="qSelectResorts">
                        resortID.options[resortID.options.length] = new 
Option('#Resort_Name#','#resort_ID#');
                        </cfoutput>}
                        
                        } 
                        
                </script> 


Here are the select lists:

<select name="adminID" size="1" style="width: 150px" 
onchange="setOptions(document.adminForm.adminID.options[document.adminForm.adminID.selectedIndex].value);">
                                                        <option value="0" 
selected>Select...</option>
                                                        <option value="1">Site 
Admin</option>
                                                        <option 
value="2">Resort Admin</option>
                                                </select>
                                                <br />
                                                <br />
                                                <select name="resortID" 
size="1" style="width: 150px" ><option value = "0">
                                                        </option></select>

The first list is hard coded as you can see and teh second one is dynamic. When 
you select Resort Admin then the second list populates with the resort names. 
What I need now is to get the resort ID's in the value and I don't know how to 
do that. If anyone can help me with this last part I would really appreciate it.


Thanks in advance,

Bruce

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352119
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to