Log in

No account? Create an account
..::.:.:. ..: .........: .:::..:::.
January 2010
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

boxing_cat [userpic]
cflocation with named ancor and URL parameters

I have a page named edit_user.cfm that consists of a form.  When a user clicks the submit button this page posts data to a cfm template that performes some database updates and then returns the control back to the form.  I was using <cflocation> tag to go back to the form from a processing page and also to pass URL parameter holding a user ID.  It was routine.  However when I tried to include a named anchor into the location URL along with the URL parameter, it did not work properly.  Redirect worked but the parameter was ignored, neither worked the anchor.  I used the following syntax, where “edit” was the named anchor.


<cflocation addtoken="no" url="edit_user.cfm##edit?user=#form.userID#">


I experimented a little bit and figured out that in order to make the anchor work in IE the right syntax should be changed to


<cflocation addtoken="no" url="edit_user.cfm?user=#form.userID#&##edit ">


Simple thing but I could not find that solution referenced anywhere in Google.