"escape" for JavaScript:
<script language=javascript>
function redirect(val) {
document.location.href = "nextpage.asp?param=" + escape(val)
}
</script>
Main Topics
Browse All TopicsI have a Javascript function that will take a URL (=string) and send it to a different ASP file called target.asp
target.asp will get the parameter using the function request.
The problem? If the URL contains a + sign, the request will change it somehow to a space. Anyone know why and how to fix that issue?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
None of these methods work. I know that because I tried to use them.
I guess I didn't express myself corectly.
I have an URL that look like this:
http://www.abc+ef.com/
If I use escape, the character + get replace normally, but when the ASP page pick it up, it replaces it by a spacebar.
Therefore if I do in the JavaScript function:
escape("http://www.abc+ef.
ASP will translate back to:
http://www.abc ef.com/
I don't see the problem. What's your code?
The following works for me:
<%
Response.Write Request.QueryString
%>
<form>
<input type=button onclick="document.location
</form>
Ok this is going to be messy but here is some of the code:
The javascript function is called:
function popupInfoGraph(tmpParam0, tmpParam1, tmpParam2, tmpParam3, tmpParam4, tmpParam5, tmpParam6, tmpParam7, tmpParam8)
{
widthPopup = 510;
<% 'Find the best size for the window %>
tmp=0;
if (tmpParam2!="") tmp++;
if (tmpParam3!="") tmp++;
if (tmpParam4!="") tmp++;
if (tmpParam5!="") tmp++;
if (tmpParam6!="") tmp++;
if (tmpParam7!="") tmp++;
if (tmpParam8!="") tmp++;
if (tmp>1)
heightPopup = 400; <%'When you click on the graph URL %>
else
heightPopup = 240; <%'When you click on the graph bars %>
if ( diaginstantPopup && ! diaginstantPopup.closed )
diaginstantPopup.close();
durl = "diaginstantGSGraphPopup.a
diaginstantPopup = window.open(durl,"","toolb
}
And the
diaginstantGSGraphPopup.as
response.write( Request("tmpParam0"))
So what is the result?
The first file send:
http://www.direktanlageban
and the diaginstantGSGraphPopup.as
http://www.direktanlageban
Business Accounts
Answer for Membership
by: thunderchickenPosted on 2000-09-12 at 16:36:07ID: 4282646
use the server.URLEncode("http://w hatever.co m") method