I am using a url to open a html page, and i am sending data in querystring withe the page url.
For example: abc.html?firstParameter=firstvalue&seconedParameter=seconedvalue
Problem is that if firstvalue or secondvalue in parameter contains
special character like #,(,),%,{, then my url is not constructing well. In this case url is not validating.
I am doing all this in javascript.
Can any body please help me out this.
You have 3 options:
But in your case, if you want to pass a url into a GET parameter of other page, you should use escape or encodeURIComponent, but not encodeURI.