SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    asp+js screen resolution function not working in netscape

    the below function allows me to pass the screen resoltion variable to asp through a cookie. It works in IE and Opera but not in Netscape. What is the problem?
    Code:
    <script language="JavaScript">
    <!--
       function checkres(){
       if('<%=Request.Cookies("screenres")%>' != window.screen.width + 'x' + window.screen.height){
          document.cookie = 'screenres=' + window.screen.width + 'x' + window.screen.height
          window.location.href("default.asp")
          }
       }   
    // -->
    </script>
    if someone doesn't know what the asp line does, then 800x600 may be an output. Like below
    Code:
    <script language="JavaScript">
    <!--
       function checkres(){
       if('800x600' != window.screen.width + 'x' + window.screen.height){
          document.cookie = 'screenres=' + window.screen.width + 'x' + window.screen.height
          window.location.href("default.asp")
          }
       }   
    // -->
    </script>
    the if statement doesn't appear to be executed in NS...so I presume that the error is in the line
    Code:
     if('<%=Request.Cookies("screenres")%>' != window.screen.width + 'x' + window.screen.height){
    thanks
    Last edited by tabsquare; Aug 24, 2002 at 07:32.

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, I found that netscape needs to be restarted in order to make it understand that the screen resolution has changed.

    well...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •