Hi there, My guess would be that the first line in your function should become document.forms[0].action = "/Include/index.cfm?var1=" + arg1; (note the starting slash)
This is ebcause of how urls work. In short if you don't start with a slash it will open it in the current directory while if you start with a slash it will start in the root. I.E. if you have your code on a page in www.demo.com/Include/index.cfm a link to "Include/index.cfm" will result in www.demo.com/Include/Include/Include.cfm while "/Include/index.cfm" will open www.demo.com/include/index.cfm HtH Robert 2010/6/17 fun and learning <funandlrnn...@gmail.com> > > Hi All - > > I have a dropdown which calls a javascript function on "onchange event". > The onchange function is as follows: > > function on_change(arg1) { > document.forms[0].action = "Include/index.cfm?var1=" + arg1; > document.forms[0].method = "post"; > document.forms[0].target = "_self"; > document.forms[0].submit(); > } > > The problem is it works fine sometimes and sometimes coldfusion throws an > error like > "File not found: /Include/Include/index.cfm" not found...what could be the > problem here? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334618 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm