-
root
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?
-
Owner of the ™ thread
-
root
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.
-
Owner of the ™ thread
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
-
root
whats the code for self close?
-
<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...
-
root
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...
-
Senior Member
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>
-
root
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|