G
gkeogh
I have the followng code which reads in variables in the URL and
converts them to javascript vars.
<script language="JavaScript">
if (window.location.search.length>1){
Params = window.location.search.substring(1);
Pairs = Params.split("&");
for (i=0;i<Pairs.length;i++){
theVar = Pairs.split("=");
eval(theVar[0] +'="'+ theVar[1]+'"');
}
}
</script>
when i do a document.write, my vars are writing out, BUT the spaces are
all displayed as
%20 (see below)
%20API/Bulk%20Manufacturing,%20Finished%20Dose
I have tried a few ideas but cant replace the "%20" with a " "
Anyone any suggestions?
Cheers
Gary
converts them to javascript vars.
<script language="JavaScript">
if (window.location.search.length>1){
Params = window.location.search.substring(1);
Pairs = Params.split("&");
for (i=0;i<Pairs.length;i++){
theVar = Pairs.split("=");
eval(theVar[0] +'="'+ theVar[1]+'"');
}
}
</script>
when i do a document.write, my vars are writing out, BUT the spaces are
all displayed as
%20 (see below)
%20API/Bulk%20Manufacturing,%20Finished%20Dose
I have tried a few ideas but cant replace the "%20" with a " "
Anyone any suggestions?
Cheers
Gary