PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WEBDEV 2024 → How DO I Get FULL URL in browser window
How DO I Get FULL URL in browser window
Started by Tony Turner, Nov., 20 2014 4:09 PM - 3 replies
Posted on November, 20 2014 - 4:09 PM
HI

I want to get the FULL URL in the browser when the page is opened.

using:

Trace(PageAddress(search, paFULL))
http://www.mywebsite.com/search.awp

I want to get whats after the query string as well so I want this returned:

I want this including query string.

http://www.mywebsite.com/search.awp? id=5&id1=8&coulor=red&glic=kjwnkdjwkjnknkn

Anyway to get the query string also....

Thanks

Tony
Posted on November, 20 2014 - 9:56 PM
Hi Tony

from the top of my head, this is done by asking for the Query_string
environment variable value (sysxxx function)...

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com


On 11/20/2014 10:09 AM, Tony Turner wrote:
HI

I want to get the FULL URL in the browser when the page is opened.

using:

Trace(PageAddress(search, paFULL))
http://www.mywebsite.com/search.awp

I want to get whats after the query string as well so I want this returned:

I want this including query string.

http://www.mywebsite.com/search.awp?
id=5&id1=8&coulor=red&glic=kjwnkdjwkjnknkn

Anyway to get the query string also....

Thanks

Tony
Posted on November, 24 2014 - 7:34 PM
Hi Fabrice,

Thanks you saved me so much time.

sEnvironment = SysEnvironment("HTTP_REFERER")
FOR EACH STRING sMyval OF sEnvironment SEPARATED by "&"
IF StringCount(sMyval,"q=",IgnoreCase) = 1 THEN
IF Length(sMyval) > 2 THEN
sMykeyword = Replace(Replace(ExtractString(URLDecode(sMyval),1,"q=",FromEnd),"+","
",IgnoreCase),"%"," ",IgnoreCase)
END
END
END


A bit rough that but that's the concept.

.... and of course thanks to PCSoft this software is just so good and getting better with every release!

It's like two Xmas's in one every year with the new edition being available soon (v20), French edition will be wizzing it's way to the UK soon in a couple of weeks.

kind regards

Tony
Posted on January, 23 2020 - 11:22 AM
Hi Tony,

I read your posting about extracting the URL from the browser.
I tried HTTP_REFERER, but it has no value.

Did you manage to get the result you wanted ?

Best regards,

Aad