While creating a script in webload, often we may need to decode the string that will appear in url or for the data that needs to be submitted using POST method.To encode or decode the string we can use the below two methods,
1."encodeURI()" or "encodeURIComponent()"
2."decodeURI()" or "decodeURIComponent()"
Sample Script for encodeURIComponent():
var userInputStr = "What is javascript?";
var searchStr = "?userinput=" +
encodeURIComponent(userInputStr);
Sample Script for decodeURIComponent():
var userInputStr = "What is javascript?";
var searchStr = "?userinput=" +
decodeURIComponent(userInputStr);