Strange string variable...

Just starting out? Need help? Post your questions and find answers here.
AMpos
Posts: 42
Joined: Mon Aug 03, 2020 5:15 pm

Strange string variable...

Post by AMpos »

Code: Select all

Global myweb.s
! v_myweb = window.location

Debug myweb.s
Debug Len(myweb.s)
debug left(myweb,len(myweb)-4)
Why len() return a "undefined" error?

I want to cut "myweb" string, but I cant not
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Strange string variable...

Post by Peter »

window.location is an object, not a string.

Code: Select all

Global myweb.s

! v_myweb = window.location.href;

Debug myweb.s
Debug Len(myweb.s)
Debug Left(myweb,Len(myweb)-4)
AMpos
Posts: 42
Joined: Mon Aug 03, 2020 5:15 pm

Re: Strange string variable...

Post by AMpos »

Thanks!
Post Reply