> So you could run into problems like:
>
> index.cfm?go=yes&url=http://www.asdf.com/index.cfm?x=x&y=y&url=jjjj
>
> In this case, the url variable url would be set to jjj (not to http...)

You hit the nail on the head my friend. Thats the problem I am running into.

So you think I should find a better way than what I am trying because its
"very, very wrong" :)

I guess its back to the drawing board. Dang!

Thanks everyone!

Phillip B.

----- Original Message -----
From: "Jerry Johnson" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 4:13 PM
Subject: Re: Passing URL in query string


> It's really not that simple.
>
> You are trying to do something that is very, very wrong.
>
> =)
>
> But a little more seriously, you are trying to pretend that url variables
aren't split up the way url variables are split up.
>
> IIRC, the url variables are treated as a "&?" delimited list starting at
the first ? character.
> Then it breaks each element of the list into name and value pairs with =
as delimiter.
>
> The problem is, it writes the variable each time it encounters one.
>
> So you could run into problems like:
>
> index.cfm?go=yes&url=http://www.asdf.com/index.cfm?x=x&y=y&url=jjjj
>
> In this case, the url variable url would be set to jjj (not to http...)
>
> I have seen (and been paid to fix) more than a few redirected websites
just like this.
>
> But if you absolutely need to do this, there is a variable called
cgi.QUERY_STRING that will tell you the complete string as it was passed.
>
> Using finds, or regex, you will be able to parse through this info, and
get what you need.
>
> (for example (horrible code, but hey...)
>
> <cfset url=rereplacenocase(QUERY_STRING,".*url=(.*)$","\1")>
>
> FWIW
> Jerry Johnson
>
> >>> [EMAIL PROTECTED] 01/21/03 04:59PM >>>
> I've tried the URLEncodedFormat and URLDecode but it still separates them.
> It shows it correctly encoded in the html but that gets blown to hell once
> you click the link. This is so freaking simple but I cant see what I am
> doing wrong.
>
> Phillip B.
>
>
> ----- Original Message -----
> From: "Clint Tredway" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 21, 2003 3:45 PM
> Subject: Re: Passing URL in query string
>
>
> > Have you tried using URLENCODEDFORMAT function to encode the vars and
then
> > use the urldecode function to decode it?
> >
> > This will probably get your desired results.
> >
> > Clint
> >
> > ----- Original Message -----
> > From: "Phillip B" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Tuesday, January 21, 2003 3:40 PM
> > Subject: Re: Passing URL in query string
> >
> >
> > > I have a link that has to have another link passed in the query
string.
> > This
> > > makes the link I click look like this.
> > > index.cfm?go=yes&url=http://www.asdf.com/index.cfm?x=x&y=y
> > > The problem is that when index.cfm gets it, it sees the variables go,
> url
> > > and y. 3 vars insted of two. What I need is to make sure the var y
stays
> > > with the url var.
> > >
> > > I hope that this is a better explanation.
> > >
> > > Phillip B.
> > >
> > >
> > >
> > > > what exactly do you mean?
> > > >
> > > > anything in the url string, is in the url string to stay.
> > > >
> > > > ...tony
> > > >
> > > > Tony Weeg
> > > > Senior Web Developer
> > > > UnCertified Advanced ColdFusion Developer
> > > > Information System Design
> > > > Navtrak, Inc.
> > > > Mobile workforce monitoring, mapping & reporting
> > > > www.navtrak.net
> > > > 410.548.2337
> > > >
> > > > -----Original Message-----
> > > > From: Phillip B [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, January 21, 2003 4:25 PM
> > > > To: CF-Talk
> > > > Subject: Passing URL in query string
> > > >
> > > >
> > > > Whats the best way to pass this
> > > > http://www.asdf.com/index.cfm?x=x&y=y
> > > > and keep everything after the "&" with the passed URL?
> > > >
> > > > Phillip B.
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to