1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need Window Resizing Tips

Discussion in 'Pay Per View' started by lllusion, Jan 13, 2011.

  1. lllusion

    lllusion Newbie

    Joined:
    Feb 26, 2010
    Messages:
    4
    Likes Received:
    2
    Hey guys. Long time lurker here finally getting around to posting. Hi. :D

    Here's what I'm trying to do:

    Pop up appears to user ---> user clicks ---> the presell page loads and it resizes to maximize in their window (not doing a _blank and throwing yet another window in their faces)

    I can make it resize to a specific dimension when they click it, but this is tricky because people have different resolutions and even if I do pick a good dimension, it's still gonna expand the window all funky and not be centered depending on where on the screen the original pop up came from.

    I've been using this code on the presell page for the time-being:

    Code:
    <script language="JavaScript">
    window.resizeTo(1200, 850)
      </script>
    But I need a better solution.

    Anybody up for explaining how we can all make our presells maximize correctly after the pop is clicked?
     
  2. webblackart

    webblackart Registered Member

    Joined:
    May 13, 2009
    Messages:
    60
    Likes Received:
    10
    you use js why not read out the window properties before.
    search on google for "JavaScript tutorial - Window size and scrolling" it seams a bit tricky because not all browers use the same dom tree.
     
  3. GreyWolf

    GreyWolf Executive VIP

    Joined:
    Aug 17, 2009
    Messages:
    1,932
    Likes Received:
    5,511
    Gender:
    Male
    Occupation:
    Artist / Craftsman
    Location:
    sitting at my PC
    Instead of giving specific diminsions you could do this.

    Code:
    <script>
    function maximize() {
      window.moveTo(0, 0);
      window.resizeTo(screen.width, screen.height);
    }
    maximize();
    </script>
     
  4. heavyt

    heavyt Newbie

    Joined:
    Apr 19, 2008
    Messages:
    5
    Likes Received:
    0
    this is what I use
     
  5. u4icjaj

    u4icjaj Newbie

    Joined:
    Nov 12, 2010
    Messages:
    20
    Likes Received:
    0
    do you put this code on the redirect page or on your lander that the user sees?