PDA

View Full Version : Passing a querystring



wila
15-Feb-2005, 05:27 PM
Mk,

Mk wrote:
> Hi All,
> move (sUrl + '/XMLUpdate.asp?ID=U&CutOffDate=' + sCutoffDate +",&ShopNo=" +
> sShopNo) to sFilePath

You have to URLencode those links. You could start by replacing the "&"
symbols with the entity "&".
So the link becomes:
move (sUrl + '/XMLUpdate.asp?ID=U&CutOffDate=' + sCutoffDate
+",&ShopNo=" + sShopNo) to sFilePath


<Quote W3C Validator service>
Entity references start with an ampersand (&) and end with a semicolon
(;). If you want to use a literal ampersand in your document you must
encode it as "&amp;" (even inside URLs!). Be careful to end entity
references with a semicolon or your entity reference may get interpreted
in connection with the following text. Also keep in mind that named
entity references are case-sensitive; &Aelig; and &aelig; are different
characters.
<End-quote W3C Validator service>

See also:
http://www.htmlhelp.com/tools/validator/problems.html#amp

--
Wil

>
> If I try to pass this query string without the comma before the &ShopNo I
> get some bizzare behaviour. Some dates always get passed and some dates
> never get passed.
>
> if I send it with the comma embedded everything gets passed ok, but I get a
> comma after the date
> in the passed function.
>
> It's easy enough to workround but I would be interested to know what the
> correct method is.
>
> Regards
> Mk
>
>

Mk@p3rfect
16-Feb-2005, 07:57 AM
Hi Will, many thanks for the info, however I should have explained that I am
passing this to an asp page as a request from a cHttpTransfer.
ie: Get DoRequest of oXmlHttpTransfer1 sHost sFilePath to sXMLReceived
As far as I can make out the &amp relates to HTML. Still it's usefull to
know about it.

In regard to my prob, I seem to have fixed it by redoing the Asp page. Tho
quite what I've changed is beyond me.

Best Regards
Mk
"Wil van Antwerpen" <info@antwise.com> wrote in message
news:Lu7RD26EFHA.4924@dacmail.dataaccess.com...
> Mk,
>
> Mk wrote:
> > Hi All,
> > move (sUrl + '/XMLUpdate.asp?ID=U&CutOffDate=' + sCutoffDate
+",&ShopNo=" +
> > sShopNo) to sFilePath
>
> You have to URLencode those links. You could start by replacing the "&"
> symbols with the entity "&amp;".
> So the link becomes:
> move (sUrl + '/XMLUpdate.asp?ID=U&amp;CutOffDate=' + sCutoffDate
> +",&amp;ShopNo=" + sShopNo) to sFilePath
>
>
> <Quote W3C Validator service>
> Entity references start with an ampersand (&) and end with a semicolon
> (;). If you want to use a literal ampersand in your document you must
> encode it as "&amp;" (even inside URLs!). Be careful to end entity
> references with a semicolon or your entity reference may get interpreted
> in connection with the following text. Also keep in mind that named
> entity references are case-sensitive; &Aelig; and &aelig; are different
> characters.
> <End-quote W3C Validator service>
>
> See also:
> http://www.htmlhelp.com/tools/validator/problems.html#amp
>
> --
> Wil
>
> >
> > If I try to pass this query string without the comma before the &ShopNo
I
> > get some bizzare behaviour. Some dates always get passed and some dates
> > never get passed.
> >
> > if I send it with the comma embedded everything gets passed ok, but I
get a
> > comma after the date
> > in the passed function.
> >
> > It's easy enough to workround but I would be interested to know what the
> > correct method is.
> >
> > Regards
> > Mk
> >
> >

Mk@p3rfect
17-Feb-2005, 02:38 PM
Hi All,
move (sUrl + '/XMLUpdate.asp?ID=U&CutOffDate=' + sCutoffDate +",&ShopNo=" +
sShopNo) to sFilePath

If I try to pass this query string without the comma before the &ShopNo I
get some bizzare behaviour. Some dates always get passed and some dates
never get passed.

if I send it with the comma embedded everything gets passed ok, but I get a
comma after the date
in the passed function.

It's easy enough to workround but I would be interested to know what the
correct method is.

Regards
Mk