Processing querystring ...

R

Raj

<html>
<body>
<script language="javascript">
locatin.href="splchars.asp?filenames=funnel slab beam bldg #15.txt;slab @ el
246.50 # 15.txt"
</script>
</body>
</html>

spchars.asp
-----------
<%
Response.write Server.URLEncode(Request("filenames"))
Response.write Server.URLPathEncode(Request("filenames"))
Response.write Server.HTMLEncode(Request("filenames"))
%>

None of the above methods allow me to read query string as same as it was
sent to the page ( i.e funnel slab beam bldg #15.txt;slab @ el 246.50 #
15.txt )

Any workarounds?
 
M

McKirahan

Raj said:
<html>
<body>
<script language="javascript">
locatin.href="splchars.asp?filenames=funnel slab beam bldg #15.txt;slab @ el
246.50 # 15.txt"
</script>
</body>
</html>

spchars.asp
-----------
<%
Response.write Server.URLEncode(Request("filenames"))
Response.write Server.URLPathEncode(Request("filenames"))
Response.write Server.HTMLEncode(Request("filenames"))
%>

None of the above methods allow me to read query string as same as it was
sent to the page ( i.e funnel slab beam bldg #15.txt;slab @ el 246.50 #
15.txt )

Any workarounds?

It's "location.href=" not "locatin.href=".

Try:

<html>
<body>
<script type="text/javascript">
var qs = "funnel slab beam bldg #15.txt;slab @ el 246.50 # 15.txt";
location.href="qs.asp?filenames=" + escape(qs);
</script>
</body>
</html>

<%
Response.Write Request.QueryString("filenames")
%>
 
M

McKirahan

[snip]
location.href="qs.asp?filenames=" + escape(qs);

[snip]

Sorry, I changed the ASP name for my testing -- it should be:

location.href="splchars.asp?filenames=" + escape(qs);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top