Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 8 of 8 total |
usage of encodeuricomponent ! |
Tue, Apr 12 2016 7:15 AM | Permanent Link |
kamran | Hi
I have these text entries that I wish to use in a url: line1 line2 body I wish to encode so that line1 and line2 appear in body on separate lines. eg with cr + line feed so I use the encodeuricomponent. body:=encodeURIComponent(line1+'%0D%0A'+line2); It does not work as expected. I guess I am using it incorrectly ! Whats the correct way to use this ? Many thanks Kamran |
Tue, Apr 12 2016 7:53 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Kamran,
<< so I use the encodeuricomponent. body:=encodeURIComponent(line1+'%0D%0A'+line2); It does not work as expected. I guess I am using it incorrectly ! >> Yes, you're doing the work of the function, so you're ending up with double-encoding. Just use this: body:=encodeURIComponent(line1+#13+#10+line2); Tim Young Elevate Software www.elevatesoft.com |
Tue, Apr 12 2016 8:00 AM | Permanent Link |
Matthew Jones | kamran wrote:
> body:=encodeURIComponent(line1+'%0D%0A'+line2); wouldn't that be body := encodeURIComponent(line1) + #13#10 + encodeURIComponent(line2); (might have to adjust to #13 + #10, can't remember) -- Matthew Jones |
Tue, Apr 12 2016 8:13 AM | Permanent Link |
kamran | Hi Tim
That works great. Much Appreciated ! Thanks Kamran Tim Young [Elevate Software] wrote: Kamran, << so I use the encodeuricomponent. body:=encodeURIComponent(line1+'%0D%0A'+line2); It does not work as expected. I guess I am using it incorrectly ! >> Yes, you're doing the work of the function, so you're ending up with double-encoding. Just use this: body:=encodeURIComponent(line1+#13+#10+line2); Tim Young Elevate Software www.elevatesoft.com |
Tue, Apr 12 2016 8:15 AM | Permanent Link |
kamran | Yes your solution same as Tim's - works great - thanks
"Matthew Jones" wrote: kamran wrote: > body:=encodeURIComponent(line1+'%0D%0A'+line2); wouldn't that be body := encodeURIComponent(line1) + #13#10 + encodeURIComponent(line2); (might have to adjust to #13 + #10, can't remember) -- Matthew Jones |
Tue, Jul 19 2016 11:38 AM | Permanent Link |
Trinione | << encodeURIComponent >>
I need to encode a URL. Where can this be found: encodeURIComponent ? |
Tue, Jul 19 2016 11:42 AM | Permanent Link |
Matthew Jones | Trinione wrote:
> encodeURIComponent uses webdom; -- Matthew Jones |
Tue, Jul 19 2016 11:44 AM | Permanent Link |
Trinione | << uses webdom; >>
Yep. Thank you. |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |