Solved

how to make windows appear?

Posted on 2000-04-11
8
239 Views
Last Modified: 2010-04-09
i want to know if anyone knows how to make small avertisment windows appear but after they appear make them minimize automatically.
0
Comment
Question by:fritolero
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 

Expert Comment

by:Le_Ron
ID: 2704075
The JavaScript 'alert("string");' will show a little dialog box containing the text "string" with an OK button, but i don't know how to make it minimize automatically.

Example for a button :

<input type=button name="MyBtn" value="Push Me" onClick="alert('This is an warning')">

Or if you want to show it when the page is loaded :

<html>
<head>
<script>
function showMsg()
{
   alert("this is the message");
}
</script>
</head>
<body onLoad="showMsg()">
....
....
</body>
</html>

Hope this helps
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 2704419
This will open an add page:
 
<SCRIPT language='javascript'>
  var mywin=window.open("myAdd.html","myPopup","width=200,height=200");
</script>


Making it minimize, I don't know, but you can close it automatically like this:

mywin.close();
0
 
LVL 1

Expert Comment

by:Smacked
ID: 2706373
i think mywin.blur() will deselect the window
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:rafistern
ID: 2706816
This
    onload="opener.focus()"
would focus the opening window
or
    onload="setTimeout('opener.focus()',5000)"
would focus the opening window after 5 seconds...
0
 
LVL 4

Expert Comment

by:rafistern
ID: 2706821
Also
    onload="window.resizeTo(0,0)"
will minimize in IE but will ignored by Netscape.
0
 

Expert Comment

by:drew_moffat
ID: 2717264
This is a little off topic, but for the browser detection part, try this link, it's pretty damn cool:

<http://www.dansteinman.com/dynduo/>

He is a god....heh

Drew
0
 

Expert Comment

by:drew_moffat
ID: 2717275
Damn, ignore that post, I thought I was in another question...sorry folks, but it's a cool link (sheepish grin)..

Drew
0
 
LVL 4

Accepted Solution

by:
dreamvb earned 500 total points
ID: 2766895
Only thing I can find that might be any good is this hope it helps

Put in Head

<script>
function winopen(){
        win = window.open("YOUR PAGE NAME", "newWin", "toolbar=yes,location=yes,directories=no,status=no, menubar=yes,scrollbars=yes,resizable=no,copyhistory=yes,width=400,height=260")
        startTime()
}

function startTime(){

        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=3; // Amount of time that the window stays open in seconds
        Timer();

}

function Timer(){
        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        curTime=hours*3600+mins*60+secs
        if (curTime>=closeTime){
                if (win.closed == false){
                        win.close()}}
        else{
                window.setTimeout("Timer()",1000)}
}
</script>

and into the Body

onLoad="winopen()"

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question