Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > javascript e asp

Reply
Thread Tools

javascript e asp

 
 
Maxb
Guest
Posts: n/a
 
      09-27-2004
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



 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      09-27-2004
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.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript or not JavaScript Mark Rae ASP .Net 36 09-09-2006 01:12 PM
href="javascript:func()" vs href="#" onclick="javascript:func()" CRON HTML 24 06-20-2006 08:05 PM
Javascript -> Applet: variable reset after method call from javascript?! mcdeveloper Java 1 06-13-2006 08:34 AM
asp.net - javascript form values interaction can asp.net read and write to nonasp forms? David Virgil Hobbs ASP .Net 0 01-06-2004 07:09 AM
ASP JavaScript versus ASP VBScript John Davis ASP General 5 09-07-2003 12:42 AM



Advertisments