http post on submit, URL being encoded
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

http post on submit, URL being encoded

From: <wingsforwheels@hotmail.com>
Date: Tue Jan 31 2006 - 23:51:53 CET

Prior to posting a form (.asp page) to a URL, I check the parameters
being passed and they are not encoded, but when the URL is served it is
encoded. How can I prevent this?

The code is as follows:
<%
Response.Buffer = True
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="Content-Type: text/plain">
<SCRIPT language="JavaScript">
function PostToURL() {

        alert(document.formA.Source.value);
        document.formA.submit();
}
</SCRIPT>
</HEAD>

<BODY bgcolor="#FFFFFF" onLoad="PostToURL();">

<form name="formA" action="<%= Session("strURL") %>">
  <input type="hidden" name='Source' value="<%= Session("strOpts") %>"
>
</form>

</BODY>
</HTML>

My alert prior to the form submit shows:
http://website.com?planSource=TEST&planId=AAABBB0001&planId=AAABBB0002&planId=AAABBB0003&planId=AAABBB0004

The result of the post is:
http://website.com?planSource=TEST%26planId%3DAAABBB0001%26planId%3DAAABBB0002%26planId%3DAAABBB0003%26planId%3DAAABBB0004
Received on Tue Feb 7 21:29:23 2006