Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Decoding parameters
Thu, Feb 20 2014 11:40 AMPermanent Link

Matthew Jones

I'm accessing the window.location.search to get the parameters sent to a page. Is
there any "built-in" mechanism to "decode" the parameters?

I realised that I should send an email in a parameter as name%40domain.com so now
need to make that %40 back to an @. This must be common, so is there an instant
way?

/Matthew Jones/
Mon, Feb 24 2014 4:18 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< I'm accessing the window.location.search to get the parameters sent to a
page. Is there any "built-in" mechanism to "decode" the parameters? >>

Use a TStringList, set the LineSeparator to '&', and then assign the search
property to the string list.  Of course, if you've got encoded names/values
in your parameters, you may need to decode them using decodeURIComponent
(WebDOM unit).  Once the parameter names/values are in the string list, you
can use the string list properties/methods to work with them individually.

Tim Young
Elevate Software
www.elevatesoft.com


Tue, Feb 25 2014 5:09 AMPermanent Link

Matthew Jones

> decode them using decodeURIComponent

Ahah, that's what I was after. I'd looked for code with '%' in, but of course the
browser external makes even more sense. Thanks.

/Matthew Jones/
Image