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.
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    North Carolina
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to Close Parent Window w/o Alert?

    I'm trying to spawn a toolbar-less window from a link on my desktop. It still throws up an alert box confirming that the user wants the window closed.

    Is there a way to close the parent window without alerting the user, particularly since the parent window is there just to spawn the child window (why this is necessary, I'm not sure).

    Thanks,
    Rick

    P.S. For more detail, please see this thread:
    Spawning Browser @ size AND no Toolbars?

  • #2
    New Coder
    Join Date
    Jul 2002
    Location
    USA, East Coast
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    something to do with security

    The parent window is opened by the user. What if he doesn't want his Web browser to be closed?

    Its a built in function for security reasons last I understood.

    You could load up a site map on the parent browser to navigate anthing your loading on the popup. That way at least the content is useful and not just a blank screen.

    -S. Bob

  • #3
    New Coder
    Join Date
    Jul 2002
    Location
    North Carolina
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change Parent?

    Is it possible to make the child the parent and then kill the parent?

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There is a way to close() the parent window from the child - on IE only, though.

    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

  • #5
    New Coder
    Join Date
    Jul 2002
    Location
    North Carolina
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OK....

    All I need is for it to work in IE. Can you post the code?

    Thanks,
    Rick

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <HEAD>

    <OBJECT id="closes" type="application/x-oleobject"
    classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
    <PARAM NAME="Command" VALUE="Close">
    </OBJECT>

    <script type="text/javascript">
    function init() {
    window.open('Page2.html','second','height=400,width=400');
    window.focus();
    closes.Click(); }
    </script>

    </HEAD>
    <BODY onload="init()">

    The above will automatically open Page2.html and close the parent onLoad.

    To make it work by clicking a button first, remove the onload="init()" command and use this:



    <A HREF="#" onClick="javascript&#58;init();">Open & Close!</A>
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

  • #7
    New Coder
    Join Date
    Jul 2002
    Location
    North Carolina
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Great!

    Many Thanks QS. I've wanted to be able to spawn a window from outside a browser with no toolbars, etc., at a given size for a long time. This seems to be the closest we can get (i.e., first spawning a "dummy" window that's resized to 1px x 1px and then closed.)

    Rick

  • #8
    New Coder
    Join Date
    Jul 2002
    Location
    North Carolina
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can the windows be centered?

    Is it possible to have these windows, launched from a shortcut on the desktop be centered?

    That would be really nice.

    Thanks,
    Rick

  • #9
    New Coder
    Join Date
    Jul 2002
    Location
    USA, East Coast
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Rofl

    geez, build the application already :P

    I think what you are really asking is if a browser can be made to behave like a custom app. This isnt a good road to travel upon. If you really need all this and more, you might want to try looking into modifying the mozilla core and open it up to allow for things like this.

    From what I understand its open source etc.

    http://www.mozilla.org/

    -S. Bob

  • #10
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    i suggest you leave it alone, period. if it's a built in security feature, then there's gotta be a good reason why you shouldn't be doing it, in which case you'd better have a REAL good reason to bypass it. and i can't imagine such a reason.

    on that note, i'd like to politely request, that those few of us, who know how to bypass that security measure, don't tell other people how. the measure is there for a reason, and we're doing no favors by making it easier to get around.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    on that note, i'd like to politely request, that those few of us, who know how to bypass that security measure, don't tell other people how. the measure is there for a reason, and we're doing no favors by making it easier to get around.
    I also recommend that these "bypass the security" things not be given out for an additional reason. These are bugs in the browser which need to be fixed, not hidden capabilities and when those bugs are fixed this code will suddenly no longer function and your page will break unexpectedly. You don't need that grief so don't try to take advantage of a bug.

    FWIW, some more serious problems related to the use of this bug have recently been reported on BUGTRAQ (specifically, unrestricted cross site scripting) and MS will be scrambling right now to disable this so this particular bug is going to have a short life.

  • #12
    New Coder
    Join Date
    Jul 2002
    Location
    North Carolina
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    gee

    For those of us who are looking to get the most out of our browsers, it seems to me a reasonable goal to be able to:

    Launch a centered window from a link on the desktop, without all the browser accoutremonts.

    For web designers/developers this comes up frequently.

    Regards,

    Rick

  • #13
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    without wanting to sound hostile, i'd like to say that if your design is at the cost of my security, i'd rather have my security.

    try looking at HTAs, in the MS link in my sig. that might be what you're looking for.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #14
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    HTA's secure? BS!

    (edited) is a tool which allows ANY file to be encoded and then embedded in plain HTML web page code as a script which will execute automatically by making use of the Hypertext Application (HTA) functions of the Microsoft Windows Scripting Host (WSH) which is called by a script embedded along with the encoded content inside that web page. It is not necessary to click on any link. The mere presence of the script in the page will automatically activate and execute (edited) which will then save the exploit to the computer's hard drive as an HTA file. This exploit was described previously by Georgi Guninski ("scriptlet exploit") but this represents the first time an automatic generator has been released along with all of the necessary source code to permit others to exploit further.


    Besides, I've used this trick on a few of my sites. Never had any complaints. The Chromeless window trick is also a bug in IE - you gonna want to remove that feature from all the different sites that use it, too?
    Last edited by Quiet Storm; 07-12-2002 at 12:26 AM.

  • #15
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    that's a rather moot point you make. The fact that neither HTAs nor embedded objects are in any way a good answer to this problem, is another excellent reason to give up on this. It can't be done without circumventing important security measures in some way, which ought to suggest that it shouldn't be done.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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