RE-Maximizing a window

Discussion in 'Javascript' started by David In NH, Apr 13, 2007.

  1. David In NH

    David In NH Guest

    Hi All:

    I've got an application that uses a browser window to display help text for
    the program. When the user presses a button, a help window appears
    (maximized) in the user's default browser. This works properly when there is
    no browser window open yet.

    If, however, the user minimizes the window and then presses the button
    again, nothing appears to happen. What I want to be able to do is to cause
    the browser window to be maximized again at that point. I've got the
    javascript code that makes the window initially open maximized but I want
    something that will re-maximize the window when invoked again.

    Any ideas?

    Thanks.
    David In NH, Apr 13, 2007
    #1
    1. Advertising

  2. David In NH

    Guest

    Hey David,

    Here is some really old code I have that will resize the window..
    There is probably a nicer way to do it though..


    w = 450;
    h = 330;
    if (navigator.appName=="Netscape") {
    top.outerWidth=w;
    top.outerHeight=h;
    } else {
    top.resizeTo(w,h);
    }



    On Apr 13, 7:44 am, "David In NH" <> wrote:
    > Hi All:
    >
    > I've got an application that uses a browser window to display help text for
    > the program. When the user presses a button, a help window appears
    > (maximized) in the user's default browser. This works properly when there is
    > no browser window open yet.
    >
    > If, however, the user minimizes the window and then presses the button
    > again, nothing appears to happen. What I want to be able to do is to cause
    > the browser window to be maximized again at that point. I've got the
    > javascript code that makes the window initially open maximized but I want
    > something that will re-maximize the window when invoked again.
    >
    > Any ideas?
    >
    > Thanks.
    , Apr 13, 2007
    #2
    1. Advertising

  3. David In NH

    David In NH Guest

    This fragment of code DOES resize the window but if it was minimized, it
    doesn't get restored. Any idea of how to get that to happen?


    <> wrote in message
    news:...
    > Hey David,
    >
    > Here is some really old code I have that will resize the window..
    > There is probably a nicer way to do it though..
    >
    >
    > w = 450;
    > h = 330;
    > if (navigator.appName=="Netscape") {
    > top.outerWidth=w;
    > top.outerHeight=h;
    > } else {
    > top.resizeTo(w,h);
    > }
    >
    >
    >
    > On Apr 13, 7:44 am, "David In NH" <> wrote:
    >> Hi All:
    >>
    >> I've got an application that uses a browser window to display help text
    >> for
    >> the program. When the user presses a button, a help window appears
    >> (maximized) in the user's default browser. This works properly when there
    >> is
    >> no browser window open yet.
    >>
    >> If, however, the user minimizes the window and then presses the button
    >> again, nothing appears to happen. What I want to be able to do is to
    >> cause
    >> the browser window to be maximized again at that point. I've got the
    >> javascript code that makes the window initially open maximized but I want
    >> something that will re-maximize the window when invoked again.
    >>
    >> Any ideas?
    >>
    >> Thanks.

    >
    >
    David In NH, Apr 13, 2007
    #3
  4. David In NH

    Guest

    use the focus command..

    window.focus();

    On Apr 13, 8:32 am, "David In NH" <> wrote:
    > This fragment of code DOES resize the window but if it was minimized, it
    > doesn't get restored. Any idea of how to get that to happen?
    >
    > <> wrote in message
    >
    > news:...
    >
    > > Hey David,

    >
    > > Here is some really old code I have that will resize the window..
    > > There is probably a nicer way to do it though..

    >
    > > w = 450;
    > > h = 330;
    > > if (navigator.appName=="Netscape") {
    > > top.outerWidth=w;
    > > top.outerHeight=h;
    > > } else {
    > > top.resizeTo(w,h);
    > > }

    >
    > > On Apr 13, 7:44 am, "David In NH" <> wrote:
    > >> Hi All:

    >
    > >> I've got an application that uses a browser window to display help text
    > >> for
    > >> the program. When the user presses a button, a help window appears
    > >> (maximized) in the user's default browser. This works properly when there
    > >> is
    > >> no browser window open yet.

    >
    > >> If, however, the user minimizes the window and then presses the button
    > >> again, nothing appears to happen. What I want to be able to do is to
    > >> cause
    > >> the browser window to be maximized again at that point. I've got the
    > >> javascript code that makes the window initially open maximized but I want
    > >> something that will re-maximize the window when invoked again.

    >
    > >> Any ideas?

    >
    > >> Thanks.
    , Apr 13, 2007
    #4
  5. David In NH

    David In NH Guest

    WOW! It works! Thanks a log Blaine!

    - David

    <> wrote in message
    news:...
    > use the focus command..
    >
    > window.focus();
    >
    > On Apr 13, 8:32 am, "David In NH" <> wrote:
    >> This fragment of code DOES resize the window but if it was minimized, it
    >> doesn't get restored. Any idea of how to get that to happen?
    >>
    >> <> wrote in message
    >>
    >> news:...
    >>
    >> > Hey David,

    >>
    >> > Here is some really old code I have that will resize the window..
    >> > There is probably a nicer way to do it though..

    >>
    >> > w = 450;
    >> > h = 330;
    >> > if (navigator.appName=="Netscape") {
    >> > top.outerWidth=w;
    >> > top.outerHeight=h;
    >> > } else {
    >> > top.resizeTo(w,h);
    >> > }

    >>
    >> > On Apr 13, 7:44 am, "David In NH" <> wrote:
    >> >> Hi All:

    >>
    >> >> I've got an application that uses a browser window to display help
    >> >> text
    >> >> for
    >> >> the program. When the user presses a button, a help window appears
    >> >> (maximized) in the user's default browser. This works properly when
    >> >> there
    >> >> is
    >> >> no browser window open yet.

    >>
    >> >> If, however, the user minimizes the window and then presses the button
    >> >> again, nothing appears to happen. What I want to be able to do is to
    >> >> cause
    >> >> the browser window to be maximized again at that point. I've got the
    >> >> javascript code that makes the window initially open maximized but I
    >> >> want
    >> >> something that will re-maximize the window when invoked again.

    >>
    >> >> Any ideas?

    >>
    >> >> Thanks.

    >
    >
    David In NH, Apr 13, 2007
    #5
  6. David In NH

    Guest

    No problem.

    On Apr 13, 11:06 am, "David In NH" <> wrote:
    > WOW! It works! Thanks a log Blaine!
    >
    > - David
    >
    > <> wrote in message
    >
    > news:...
    >
    > > use the focus command..

    >
    > > window.focus();

    >
    > > On Apr 13, 8:32 am, "David In NH" <> wrote:
    > >> This fragment of code DOES resize the window but if it was minimized, it
    > >> doesn't get restored. Any idea of how to get that to happen?

    >
    > >> <> wrote in message

    >
    > >>news:...

    >
    > >> > Hey David,

    >
    > >> > Here is some really old code I have that will resize the window..
    > >> > There is probably a nicer way to do it though..

    >
    > >> > w = 450;
    > >> > h = 330;
    > >> > if (navigator.appName=="Netscape") {
    > >> > top.outerWidth=w;
    > >> > top.outerHeight=h;
    > >> > } else {
    > >> > top.resizeTo(w,h);
    > >> > }

    >
    > >> > On Apr 13, 7:44 am, "David In NH" <> wrote:
    > >> >> Hi All:

    >
    > >> >> I've got an application that uses a browser window to display help
    > >> >> text
    > >> >> for
    > >> >> the program. When the user presses a button, a help window appears
    > >> >> (maximized) in the user's default browser. This works properly when
    > >> >> there
    > >> >> is
    > >> >> no browser window open yet.

    >
    > >> >> If, however, the user minimizes the window and then presses the button
    > >> >> again, nothing appears to happen. What I want to be able to do is to
    > >> >> cause
    > >> >> the browser window to be maximized again at that point. I've got the
    > >> >> javascript code that makes the window initially open maximized but I
    > >> >> want
    > >> >> something that will re-maximize the window when invoked again.

    >
    > >> >> Any ideas?

    >
    > >> >> Thanks.
    , Apr 13, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles

    Maximizing Web Page

    Charles, Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    383
    Ken Cox [Microsoft MVP]
    Aug 9, 2003
  2. nospam
    Replies:
    13
    Views:
    594
    Guinness Mann
    Oct 7, 2003
  3. Replies:
    6
    Views:
    658
  4. Stephan Kämper
    Replies:
    1
    Views:
    121
    Stephan Kämper
    Nov 1, 2003
  5. Marina Ferguson

    maximizing window with xml file

    Marina Ferguson, Nov 24, 2003, in forum: Javascript
    Replies:
    1
    Views:
    114
Loading...

Share This Page