Solved

how to make windows appear?

Posted on 2000-04-11
8
221 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
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
html input type 3 32
Only three borders showing on image 5 19
Width of Page is Affecting Side Menu 6 25
Html5 string 3 22
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

777 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