I had a circumstance where i needed to encode a variable with spaces into a web link via ssjs. So i looked for @URLEncode(), it not there.... So I emailed Paul Hannan and asked if there was a way to do this, and as usual he came back with a quick response with an answer.
Here is the code i used in SSJS
attachmentnames = java.net.URLEncoder.encode(@AttachmentNames(),"UTF-8")
3 comments:
Perhaps I am missing something here, but you could use the javascript escape directive to acomplish much the same thing.
escape(@AttachmentNames);
Newbs
Nice post for any kind for information related with web development and web site design click on web development.
Hear you get all the information about web site design.
Unfortunatly, in 8.5.1 the escape() command is not (yet) implemented. I found that these do not work in serverside JavaScript in Notes 8.5.1:
@UrlEncode
encodeURI
encodeURIComponent
Axel Neuhaus
Post a Comment