SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript popup error - Opera only

    Hi there

    I have a site which uses a javascript fullscreen popup window which launches from the splash page (as well as a standard browser version for those with non-compliant browsers). All works well on both Netscape and IE, but if you're using Opera and you click on the "All other browsers" version, you get both the browser version and the popup version. This will probably be very irritating to Opera users. Unfortunately, I can't just program the popup for Opera compliance as well because it won't do fullscreen - it nests under the ad/control bars. Could someone look at it in Opera and maybe suggest a solution? Opera users don't make up a lot of my user base but I really prefer to be Opera-compliant. Thanks a lot.

    http://laurieholden.deslea.com

    Cheers! Deslea
    signature

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this probably won't be much help to your specific problem, but you seem to be alienating any users over 800x600 !! i went to have a look, but couldn't find my option...

    you might be better off doing what i do and automatically directing (or offering a link to the main page) dependant on their browser and screen res, using a little JS. You might possibly confuse your users.

    I'll post the code if it will be of use.
    Last edited by weirdbeardmt; Sep 22, 2001 at 13:38.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    SitePoint Member
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for taking the time to check it out. The Javascript code for a redirect would be great! I did have a Netscape one redirect, but it redirected Opera and others as well . Appreciate the comment about larger resolutions, too.

    Peace! Deslea
    signature

  4. #4
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by drjudd
    Thank you for taking the time to check it out. The Javascript code for a redirect would be great! I did have a Netscape one redirect, but it redirected Opera and others as well . Appreciate the comment about larger resolutions, too.

    Peace! Deslea
    This is what I use. It will redirect dependant on browser res at the moment, but could be modified to do both res and browser name, iyw, and I have also added a resize, so that on any browsers viewing at a certain res it will resize. If you tell me exactly what you want (e.g. opera users at 800x600 to be pointed at "pagea.html" at fullscreen) then I'll happily modify it for you.

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    
    function redirectPage() {
    var page640x480 = "error.html";
    var page800x600 = "small.html";
    var page1024x768 = "large.html";
    var page1640x768 = "large.html";
    
    if ((screen.width == 640) && (screen.height == 480)) 
    window.location.href= page640x480;
    else if ((screen.width == 800) && (screen.height == 600)) 
    window.location.href = page800x600;
    else if ((screen.width == 1024) && (screen.height == 768)) {
    window.resizeTo(900,750);
    window.location.href= page1024x768; }
    else if ((screen.width == 1280) && (screen.height == 1024)) 
    window.location.href= page1640x480;
    else window.location.href= page1640x480;
    }
    
    </script>
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  5. #5
    SitePoint Member
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is what I use. It will redirect dependant on browser res at the moment, but could be modified to do both res and browser name, iyw, and I have also added a resize, so that on any browsers viewing at a certain res it will resize. If you tell me exactly what you want (e.g. opera users at 800x600 to be pointed at "pagea.html" at fullscreen) then I'll happily modify it for you.
    Thank you so very much. That's incredibly helpful! Javascript is something I'm still getting to know - I only started using it this year - so I'm not confident modifying code yet. I appreciate the help.

    What I'd like is -

    IE 4+ and Netscape 4+ at 800x600+ to go to ie800.html
    IE 4+ and Netscape 4+ at 640x480 to go to ie640.html
    Opera, older IE and Netscape, and others at 800x600+ to go to opera800.html
    Opera, older IE and Netscape, and others at 640x480 to go to opera640.html

    Thank you so much!

    Cheers! Deslea
    signature

  6. #6
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <HTML>
    <TITLE>Redirection page</TITLE>
    <HEAD>
    
    <SCRIPT LANGUAGE="JavaScript">
    
    function redirectPage() {
    var page640x480 = "ie640.html";
    var page800x600 = "ie800.html";
    var pageOpera640 = "opera640.html";
    var pageOpera800 = "opera800.html";
    
    if ((navigator.appName == 'Netscape' || 'Microsoft Internet Explorer') && (navigator.appVersion >= '4') && (screen.width >= '800') && (screen.height >= '600')) 
    window.location.href = page800x600; 
    
    else if ((navigator.appName == 'Netscape' || 'Microsoft Internet Explorer') && (navigator.appVersion >= '4') && (screen.width = '640') && (screen.height = '480')) 
    window.location.href = page640x480; 
    
    else if (((navigator.appVersion < '4') || (navigator.appName = 'Opera')) && (screen.width >= '800') && (screen.height >= '600')) 
    window.location.href = pageOpera800; 
    
    else window.location.href = pageOpera640; 
    
    }
    
    </script>
    </HEAD>
    <BODY ONLOAD="redirectPage()">
    </BODY>
    </HTML>
    That should work, but I don't have a version 3 or Opera browser to test it on. If you get any problems or you think I've missed something, just give me a yell.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  7. #7
    SitePoint Member
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thank you so much!

    Thank you so much for taking the time to do that for me. Much appreciated.

    Cheers! Deslea
    signature

  8. #8
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anytime.

    let me know if it works OK (or doesn't for that matter!) and/or also if you want the
    auto window size added.

    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky


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
  •