SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2002
    Location
    UK
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can I set all window properties in a page?

    Hi,

    I have some pages which appear in pop up windows, but can be linked to from different places. In some cases the pages have to appear in a new window, and in some cases they need to populate the window they were linked to from.

    For a given page I want all the window properties to be the same. At the moment I am setting the window size in the page using onLoad and resizeTo() and moveTo().

    I am setting the other properties using window.open() in the calling link.

    Is there any way I can set these properties in the called page (like resizeTo() and moveTo()), rather than in the link, i.e. some function that takes 'scrollbars','resizable','toolbar', etc., so that I only have to define them once?

    Thanks,
    Jack.

  2. #2
    SitePoint Zealot
    Join Date
    Aug 2002
    Location
    UK
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I am asking is to be able to change the properties of an existing window when I load a new page.

    I now think this maybe impossible and that I must create a new window if I want different properties, and define the properties using window.open() on the link, then close the old window.

    Is this correct?

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I know you can't change menu, status, scroll, etc on the fly. You could however create a pop window function so that you dont have to type out the entire parameter list everytime.
    Code:
    function pop(url, title, w, h, menu, scroll, status) {
     params = "width=" + w + ", height=" + h + ", menubars=" + menu";
    }
    then when you call the function

    pop('x.html','title',100, 100, 'yes', 'no', 'yes')

    something like that might ease the pain

    www.unpossiblemedia.com - A Fort Lauderdale based multimedia company.


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
  •