Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: EASY Question

  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    UK
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool EASY Question

    Sorry if this is simple but can't see anything on google! I hate to use client side scripting and know hardly anything about it but hopefully someone can help?

    I have a window that is opened and need to hide it as soon as it opens, i.e. minimized. Does this need to be done on the open link to the page or can it be done on the page itself?

    Thanks guys

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Leeus
    Sorry if this is simple but can't see anything on google! I hate to use client side scripting and know hardly anything about it but hopefully someone can help?

    I have a window that is opened and need to hide it as soon as it opens, i.e. minimized. Does this need to be done on the open link to the page or can it be done on the page itself?

    Thanks guys
    Sounds devious.
    Why?.....

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,074
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Are you trying to minimize popup ad windows?
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    UK
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No its not for anything nasty!

    We have an intranet which is all ASP and I have a window that calls an ActiveX control that makes phone calls via TAPI. Quite cool really. At the moment I have the window size set to (1,1) but it still shows as a square. Once the call is completed I have used window.close() which works great but while the call is in progress it would be nice to hide it!

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,074
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Since this is for IE only, you can position the window out of the visible screen.

    window.open('thepage.htm','_blank','left=8000,top=6000,width=1,height=1');

    But why not display a message such as "Call in progress...", instead of hiding the window? And then put an onbeforeunload event handler to handle the closing.

    window.onbeforeunload = function(){
    event.returnValue = "Closing the window will terminate your call.";
    }

    And then before the script closes the window once the call is finished, set onbeforeunload to null to remove it.

    window.onbeforeunload=null;
    window.close();
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #6
    Regular Coder
    Join Date
    Jun 2004
    Location
    underground
    Posts
    186
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use the InternetExplorer object.
    It is invisible by default... just make sure to close it, when finished.

  • #7
    Regular Coder
    Join Date
    Sep 2002
    Location
    UK
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This looks very VB-ish, will this work on ASP?

  • #8
    Regular Coder
    Join Date
    Jun 2004
    Location
    underground
    Posts
    186
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Nevermind...

    I forgot that it was not marked as safe for scripting in IE.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •