Set up the page in the first place to have an onload event that runs the changeMenu function, something like this: <CFOUTPUT><SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> function initPage() { /* Make sure the the second select box does not revert to the options available had the first option in the first select box been selected */ var selectionObject = document.#Variables.FormName#.#Variables.TwoSelectsRelatedNAME1Field#; if(selectionObject!=null) { var selectionIndex = selectionObject.selectedIndex; if(selectionIndex<>-1) {
#Variables.FormName##Variables.TwoSelectsRelatedNAME1Field#ChangeMenu(select ionIndex); selectionObject = document.#Variables.FormName#.#Variables.TwoSelectsRelatedNAME2Field#; if(selectionObject!=null) { selectionObject.options[0].selected = true; } } } } </SCRIPT></CFOUTPUT> <BODY onLoad="initPage();"> <!--- cf two selects related goes in here, inside of a form named #Variables.FormName# ---> </BODY> -----Original Message----- From: cf kaizen [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 2:04 PM To: CF-Talk Subject: Auto Refresh Hi There, Upon hitting the back button to go back to a page with the twoSelectsRelated tag on it, the first select box maintains its selected option, whereas the second select box reverts to the options available had the first option in the first select box been selected, causing an error when the user resubmits the form. I've been trying to force a refresh of the page, but my refresh code causes havoc on the two select boxes. Any ideas? Thanks, Andy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists