I am using this script: <cfoutput> <script type="text/javascript"> var SiteContact = {}; var SitePhone = {}; <!--- Populate Site Contact Information ---> <cfloop query="qSelectAllSites"> SiteContact["#qSelectAllSites.SiteID#"] = '#qSelectAllSites.SiteContact#'; SitePhone["#qSelectAllSites.SiteID#"] = '#qSelectAllSites.SitePhone#'; </cfloop>
// Listen for changes to the select box document.getElementById('Site_ID').onchange = function() { document.getElementById('SiteContact').value = qSelectAllSites[this.options[this.selectedIndex].value]; document.getElementByID('SitePhone').value = qSelectAllSites[this.options[this.selectedIndex].value]; } </script> </cfoutput> Everything works OK except for the first document.getElementByID. I am getting the error message: Error: document.getElementById("Site_ID") has no properties Source File: http://10.120.5.30/tt/Restricted/CaseForm.cfm Line: 78 The select is: <cfselect name="Site_ID" id="Site_ID" query="qSelectAllSites" display="SiteName" value="SiteID"></cfselect> So what am I missing here? Doesn't the document.GetElementByID('Site_ID')......... listen for the select list with the ID Site_ID? Thanks, Bruce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303611 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4