|
|
 |
RE: FN-FORUM: URL Encoding problem
date posted 9th June 2005 16:45
Callback;
Products list > Product View > Add to Basket > basket View ...
|
^ |
..........................................................|
So when you click on the "view product" link on the products list page -
which is "paged", i.e., might be page 3 of 7 and have other parameters
in it's query string then I want to basically pass that down the chain
of product view, add to basket, basket view so that when I click on
"continue shopping on the basket view" it goes back to the view product
page. That page *could* be from anywhere on the site so I can't pass
parameters to deal with it. Obviosuly if this was all posted data it'd
be ok, but it needs to be standard HREF calls.
So the issue then becomes if I want to append an additional bit of text
to the front of the strings and then strip them off later - which is I
guess only the same as encoding stuff. It doesn't however get around the
multiple & issue because;
Page.aspx?p1=3D123&p2=3D456&p3=3Dcallback.aspx?x_p1=3D456&x_p2=3D789
Would still be;
Page.aspx?
p1=3D123&
p2=3D456&
p3=3Dcallback.aspx?x_p1=3D456&
x_p2=3D789
So p3 would only be callback.aspx?x_p1=3D456 but without the x_p2. Or am =
I
mistaken ? (may well be !)
I think the best option is going to be to properly encode any paths /
URLs so they have no & or ? Characters in them. Maybe encrypt / decrypt
them with a simple algorithm. I've a suitable process that splits a
standard 8 bit character into 2 4 bit characters and builds a string of
ABCDEFGHIJKLMNO values.
Cheers
Andy
=20
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Graeme
J Sweeney
Sent: Thursday, June 09, 2005 4:52 PM
To: Andy Macnaughton-Jones
Subject: Re: FN-FORUM: URL Encoding problem
On Thu, 9 Jun 2005, Andy Macnaughton-Jones wrote:
> I'm building an e-commerce site and I need to maintain callbacks when=20
> I move between pages.
Can you explain the 'callbacks' thing?
> I've got an href call to;
>
> =
addtobasket.aspx?productuid=3D3D171752&qty=3D3D1&clickaddonpage=3D3Dprodu=
ct.
> asp=3D
> x?cat
> =
egoryid=3D3D368&productuid=3D3D171752&clickproductonpage=3D3Dcategory.asp=
x?c
> ate=3D
> goryi
> d=3D3D368
> Any suggestions short of encoding and then decoding the string
entirely
> ?
It looks like your just appending the path + query string to
clickaddonpage and clickproductonpage ?
I would be a little less lazy and append these parameters as
clickaddonpage =3D caop_=3D and clickproductonpage =3D
cpp_=3D
rather than encoding them. Assuming you want them available individually
in the request cycle.
If not, extend HTMLEncode method and add checks for '=3D' and '?' ?
IIUC .........
--
Graeme -
Outlook Express user? -
http://home.in.tum.de/~jain/software/oe-quotefix/
http://wiki.workalone.co.uk/index.php?page=3DRulesForPosting
--
Freelancers, contractors earn more with Prosperity4 Call 0870 870 4414
or visit www.prosperity4.com and benefit from Inland Revenue approved
expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|