Below is the error code c URIError: malformed URI sequence?, when in the URL string there is a character %similar to 60% - Completedwhere I need to extract the parameter value, for example.http://some-external-server.com/info?progress=60%%20-%20Completed
<SCRIPT type="text/javascript">
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
</SCRIPT>
I have no control over the server and you need to process the output on my html page.
source
share