dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Java close

  1. #1
    root juxtaman's Avatar
    Join Date
    Aug 2002
    Location
    /dev/null
    Posts
    870
    I'm using a java resolution detect to load my site.. i want to close the window after its done loading.. anyone know the code.. maybe with a pause time of 5 seconds, enough time to detect and then close...

    any help?

  2. #2

  3. #3
    root juxtaman's Avatar
    Join Date
    Aug 2002
    Location
    /dev/null
    Posts
    870
    that's what i need but i don't know what part of that...

    the problem is from the resolution detector is a java screen that loads java screens.. so i need the detector to automaitically close...

    i can't seem to decifer from that link what i need to simply close the parent window after a certain time.

  4. #4
    Owner of the thread tublu's Avatar
    Join Date
    Nov 2000
    Posts
    2,430
    to close the parent windiow ... you normaly use the self.close .
    but I am sorry I myself didn't fully open that link I sent .. just read the descripttion and though ti would help

  5. #5
    root juxtaman's Avatar
    Join Date
    Aug 2002
    Location
    /dev/null
    Posts
    870
    whats the code for self close?

  6. #6
    Senior Member
    Join Date
    Sep 2001
    Posts
    118
    <script>
    function GoAway() {
    window.self.close();
    }
    </script>

    ------------

    But this will throw up an error message if it is the parent window ("The website is trying to close this window... YES/NO") so that's a small problem...

  7. #7
    root juxtaman's Avatar
    Join Date
    Aug 2002
    Location
    /dev/null
    Posts
    870
    hrmm, that might not work... see it's a small window only 100x100 just says detecting resolution, i want to just disapear after its done... having another pop-up come up asking for the user to take action won't do me any good.

    maybe this can't be done the way i need it...

  8. #8
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    A quick question, why does the resolutions detect script need to appear in a new window? Wouldn't it be easier to have the script in your main window and launch the site according to the users resolution

    something like

    <script language="javascript">
    <!--
    width = screen.width;
    height = screen.height;

    if (width <= 640) {
    newWindow = window.open('smallpage.html','myWindow','width=500 ,hieght=300');
    } else if (width <= 800) {
    newWindow = window.open('mediumpage.html','myWindow','width=65 0,hieght=450');
    } else if (width <= 1024) {
    newWindow = window.open('biggerpage.html','myWindow','width=90 0,hieght=600');
    } else {
    newWindow = window.open('biggestpage.html','myWindow','width=1 050,hieght=900');
    }
    //-->
    </script>

  9. #9
    root juxtaman's Avatar
    Join Date
    Aug 2002
    Location
    /dev/null
    Posts
    870
    i wanted to have a splash and a cool entrance to the site.. even if i do a page that does resolution detecting i would still want it to go away after a while.

    Also i want people to remain on my web site and have the rest java pop-up.


    the script you have is what i'm using but all i need is a close.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center