First of all, you have to locate the file which you want to encode. You can either create an HTML file or directly a JV file. It is extremely important for you to use the right codes in your file, otherwise you will not be able to execute them. Moreover, you also have to open and close the tags in the right way.
After locating the file in your computer, you have to right-click on it. You will see some options, keep your cursor on ‘Open With’ and then select your own editor.
Now, you have to create the encoded URL. You must know that each character of the URL will have its own encoding series which you have to follow in order to get the desired results. For example, in this URL “var url = http://site.com/index.php?name=joe%3Asmith”, you can see the colon between the first and last names of the user.
Then, you must forward the user. After encoding the URL, you will have to embed it in your own script which you wrote so as to redirect it. You will not be able to encode your URL in the JV until or unless you embed your script with the encoded URL. Besides, you have to follow the above mentioned steps in sequence, otherwise the code will not execute the required results. In order to send the user to the encoded URL, you can use the code “windows.location.href=url;” in your programme.