javascript e asp

M

Maxb

I don't understund this script (i'm italian and speek english not very well)

<script language="javascript">
var browser='';
browser=navigator.appName;
document.cookie = "ScreenSize=" + screen.width + "-" + screen.height;
document.cookie = "Browser=" + browser;
</script>
<%
response.write(Request.Cookies)
%>
The cookie is write at first time but with the asp script i can read only
after one refresh.
Someone has the solution?

Thanks Max
 
E

Evertjan.

Maxb wrote on 27 sep 2004 in comp.lang.javascript:
I don't understund this script (i'm italian and speek english not very
well)

<script language="javascript">
var browser='';
browser=navigator.appName;
document.cookie = "ScreenSize=" + screen.width + "-" +
screen.height; document.cookie = "Browser=" + browser;
</script>
<%
response.write(Request.Cookies)
%>
The cookie is write at first time but with the asp script i can read
only after one refresh.
Someone has the solution?

There is nothing wrong here, Max, so there is no solution.

ASP runs on the server BEVORE the page gets to the browser,
so the refresh is necessary to read the cookie.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top