[thelist] ASP Replace Spaces in URLs

Michele Foster michele at wordpro.on.ca
Tue Dec 18 14:47:47 CST 2001


Hi folks,

I'm stuck here .. every option I try isn't working  ;(

I have a form that gets submitted, once that page has been validated and
approved, the user clicks to create a printable version  of a gift
certificate.  All works well in  IE.  But, NS is ignoring the spaces in the
URL string.

What I want to do is replace the spaces so that when the URL string gets
built and passed to the printable page, the spaces are there.

Here's how I'm first accessing the information:

gift=trim(Request("gift"))
giver=trim(Request("giver"))
....

gift = replace(gift, Chr(20), "%20;")
giver = replace(giver, Chr(20), "%20")
....

Then I'm validating the information and passing the url string as such:

Response.write "<p>All information has been processed.  The final step is to
click on the link below ""Create Gift Certificate"" and print out your Gift
Certificate on the next page.</p>" &_
"<p><a href=""/gift/create_process.asp?gift=" & gift &"&amp;amount=" &
amount & "&amp;giver=" & giver & "&amp;recipient=" & recipient &
"&amp;auth=" & auth & "&amp;name="& name & "&amp;telephone=" & telephone
&""">Create Gift Certificate.</a></p>"


And break it does in NS :(   I need the data available on screen and in an
email to be sent to the client.

The query string still appears with the spaces, so, my replace isn't working
.. and is breaking somewhere along the way too. :(

Where have I gone wrong?

Thanks,

Michele






More information about the thelist mailing list