MaxOvrdrv2
asked on
5 second splash screen with image
Hi,
I would like to know if there is any code available or if anyone knows how to make a Splash Screen type of thing where a window would pop-up, load an image within the new window (or it could be hardcoded on the page that it loads... i don't care) and then closes the window after 5 seconds... or less...
I'm sure there is a way to do this... i need a working response A.S.A.P. and i've given the points to reflect that... hope you guys can help!
Thanks!
MaxOvrdrv2
I would like to know if there is any code available or if anyone knows how to make a Splash Screen type of thing where a window would pop-up, load an image within the new window (or it could be hardcoded on the page that it loads... i don't care) and then closes the window after 5 seconds... or less...
I'm sure there is a way to do this... i need a working response A.S.A.P. and i've given the points to reflect that... hope you guys can help!
Thanks!
MaxOvrdrv2
Check out if this helps. Copy the below code and make two files 1. Test.html 2. splash.html
Open Test.html in browser.
=====================test. html====== ========== =========
<HTML>
<HEAD><TITLE>TESTING</TITL E>
<SCRIPT language="javascript">
<!--
function openFlash(){
//Try both the option and use according to your requirement
//var w = window.open('splash.html', 'new_win', 'fullscree n=no,statu s=no,butto ns=no,tool bar=no,loc ation=no,s crollbars= 0,resizabl e=no');
var w = window.open('splash.html', 'new_win', 'fullscree n=yes,stat us=no,butt ons=no,too lbar=no,lo cation=no, scrollbars =0,resizab le=no');
w.resizeTo(400,130);
var lleft = get_lleft (400);
var ltop = get_ltop (130);
w.moveTo(lleft,ltop);
w.focus();
}
function get_lleft ( p_width ){
var l = (screen.availWidth/2)-(p_w idth/2);
return l;
}
function get_ltop ( p_height ){
var t = (screen.availHeight/2)-(p_ height/2);
return t;
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="javascript:openFla sh()">
</BODY>
</HTML>
====================== splash.html =====================
<HTML>
<HEAD><TITLE>TESTING</TITL E>
<SCRIPT language="javascript">
<!--
function handleOnLoad(){
window.setTimeout("closeWi n()",5000) ;
}
function closeWin(){
self.close();
}
//-->
</SCRIPT>
<STYLE type="text/css">
<!--
body{
background-color : #D4D0C8;
border : thin outset;
}
td.frame{
background-color : #D4D0C8;
border : thin groove;
}
//-->
</STYLE>
</HEAD>
<BODY topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 onload="javascript:handleO nLoad()">
<TABLE>
<TR>
<TD valign="center" align="center">
<TABLE width="370px" height="100px">
<TR>
<TD class="frame" valign="center" align="center">
<IMG src="https://www.experts-exchange.com/v3.0/images/greyLogo.jpg">
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Open Test.html in browser.
=====================test.
<HTML>
<HEAD><TITLE>TESTING</TITL
<SCRIPT language="javascript">
<!--
function openFlash(){
//Try both the option and use according to your requirement
//var w = window.open('splash.html',
var w = window.open('splash.html',
w.resizeTo(400,130);
var lleft = get_lleft (400);
var ltop = get_ltop (130);
w.moveTo(lleft,ltop);
w.focus();
}
function get_lleft ( p_width ){
var l = (screen.availWidth/2)-(p_w
return l;
}
function get_ltop ( p_height ){
var t = (screen.availHeight/2)-(p_
return t;
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="javascript:openFla
</BODY>
</HTML>
====================== splash.html =====================
<HTML>
<HEAD><TITLE>TESTING</TITL
<SCRIPT language="javascript">
<!--
function handleOnLoad(){
window.setTimeout("closeWi
}
function closeWin(){
self.close();
}
//-->
</SCRIPT>
<STYLE type="text/css">
<!--
body{
background-color : #D4D0C8;
border : thin outset;
}
td.frame{
background-color : #D4D0C8;
border : thin groove;
}
//-->
</STYLE>
</HEAD>
<BODY topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 onload="javascript:handleO
<TABLE>
<TR>
<TD valign="center" align="center">
<TABLE width="370px" height="100px">
<TR>
<TD class="frame" valign="center" align="center">
<IMG src="https://www.experts-exchange.com/v3.0/images/greyLogo.jpg">
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i had it done already from the JavaScript section... but since you put some time and code into this... i'll give you the points... i'm in a good mood today!
Cheers!
Enjoy!
Don't spend em all!
MaxOvrdrv2
Cheers!
Enjoy!
Don't spend em all!
MaxOvrdrv2
ASKER