Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

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



Messages by Day
June 30th 2005
June 29th 2005
June 28th 2005
June 27th 2005
June 26th 2005
June 25th 2005
June 24th 2005
June 23rd 2005
June 22nd 2005
June 21st 2005
June 20th 2005
June 19th 2005
June 18th 2005
June 17th 2005
June 16th 2005
June 15th 2005
June 14th 2005
June 13th 2005
June 12th 2005
June 11th 2005
June 10th 2005
June 9th 2005
June 8th 2005
June 7th 2005
June 6th 2005
June 5th 2005
June 4th 2005
June 3rd 2005
June 2nd 2005
June 1st 2005


Messages by Month
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005


Messages by Year
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000