Need help with an "exit door" page
My office has a page on our webserver that serves as an "exit door". It basically tells you when you're leaving our site (they do this because it's a gov't site, and thus rquired) and you have to click on a link to confirm that you want to leave.
The way it works is that when you code a page with a link that needs an exit door, you prepend the url with "exit.cfm?link=" and then the URL. It works adequately on simple URLS that pass no parameters. Where it has a problem is when a URL has GET arguments like ?page=23&item=43.
The original coder used URL.link, which of course only captures the first GET argument. As a work-around, we're required to edit the target URLS being passed to the exit door and replace things like & and # with [amp], [pound], etc. Needless to say, this gets rather tedious, so I decided to have a look at that old exit door page to see what I could do with it.
After playing around a bit, I achieved a reasonable level of success by using the following:
#xmlformat(ListDeleteAt(CGI.QUERY_STRING,1,"="))#
This gives me a properly encoded full URL to use as a link on the exit door page. But there's one problem. If there's a link that contains an anchor (like foo.com#section1) it doesn't capture the anchor. The # and what's after it isn't being passed.
I'm trying to figure out how to make this work. Has anyone else here had to make an exit door, and if so, how did you do yours?
