SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: resize window

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    resize window

    Is this possible.
    I want a link on page1 to open a new window using
    Code:
    <a href="#"  onclick="window.open('page2.php','remote','height=380,width=550,location=no,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');return false;">link</a>
    then on page2 I want a link to open page3 using
    Code:
    <a href="page3.php" target="_self">link</a>
    and when page3 opens I have
    Code:
    <script>window.resizeTo(screen.width,screen.height)</script>
    to resize the page back to normal but I also want the scrollbars etc back..how can I do that?

  2. #2
    SitePoint Member
    Join Date
    Feb 2007
    Location
    Brooklyn, NY
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you need page3 to be in a new window over the original opener? If not, your link in page2 could call a function that opens page 3 in the original opening window and closes the page2 window at the same time.
    function closeWin()
    {
    self.close();
    }
    function refreshMain()
    {
    window.opener.location = "page3.php";
    closeWin();
    }

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that. I don't really want page 3 to open in a new window but I suppose if a function closes page2 as page 3 opens ..that might do!


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
  •