unknown
2006-08-23 04:17:04 UTC
Any help appreciated
Trying to pass javascript prompt value to asp for processing.
Each time I refresh the page, the asp code writes the previous
prompt's value. Is the cookie not written before the asp code
executes?
Many thanks in advance.
<script type="text/javascript">
var a = prompt("Enter Password please!");
document.cookie = "test=" + escape(a) + "; expires=1/1/2010";
</script>
<%
response.write "test=" & Request.cookies("test") & "<br>"
%>
Trying to pass javascript prompt value to asp for processing.
Each time I refresh the page, the asp code writes the previous
prompt's value. Is the cookie not written before the asp code
executes?
Many thanks in advance.
<script type="text/javascript">
var a = prompt("Enter Password please!");
document.cookie = "test=" + escape(a) + "; expires=1/1/2010";
</script>
<%
response.write "test=" & Request.cookies("test") & "<br>"
%>