1

Hi I am currently working with a form in html, passing form data from one html form to another. When displaying the data I am getting %20 in the place of every space. Is there a way to replace this?

My code in the receiving page is:

<script type = "text/javascript"> 
    document.write("Business Name:  ", BusinessName);<-- Variables that are passed through URL-->
    document.write("Business Type:  ", BusinessType);
    document.write("Business Purpose:  ", BusinessPurpose);
</script>
George Stocker
  • 57,289
  • 29
  • 176
  • 237
user3396441
  • 29
  • 1
  • 5

1 Answers1

5

Use unescape()

Your string is url encoded. just unescape it.

unescape("asd%20asd")
-> "asd asd"
Manuel Richarz
  • 1,916
  • 13
  • 27