javascript e asp

Discussion in 'Javascript' started by Maxb, Sep 27, 2004.

  1. Maxb

    Maxb Guest

    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
     
    Maxb, Sep 27, 2004
    #1
    1. Advertisements

  2. Maxb

    Evertjan. Guest

    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)
     
    Evertjan., Sep 27, 2004
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Virgil Hobbs
    Replies:
    0
    Views:
    588
    David Virgil Hobbs
    Jan 6, 2004
  2. mcdeveloper
    Replies:
    1
    Views:
    4,398
    mcdeveloper
    Jun 13, 2006
  3. CRON
    Replies:
    25
    Views:
    209,092
    davidb
    May 29, 2015
  4. Mark Rae

    JavaScript or not JavaScript

    Mark Rae, Sep 5, 2006, in forum: ASP .Net
    Replies:
    36
    Views:
    1,238
    Paul Sture
    Sep 9, 2006
  5. John Davis

    ASP JavaScript versus ASP VBScript

    John Davis, Sep 6, 2003, in forum: ASP General
    Replies:
    5
    Views:
    186
    Curt_C [MVP]
    Sep 7, 2003
Loading...

Share This Page