• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

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
0
MaxOvrdrv2
Asked:
MaxOvrdrv2
  • 2
  • 2
1 Solution
 
MaxOvrdrv2Author Commented:
crap.. this should be in the JavaScript section... it's ok.. if anyone can answer.. let me know... in the mean time... i will post another question in JavaScript sections...
0
 
nimaigCommented:
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</TITLE>
     <SCRIPT language="javascript">
     <!--
          function openFlash(){
               //Try both the option and use according to your requirement
               //var w = window.open('splash.html','new_win','fullscreen=no,status=no,buttons=no,toolbar=no,location=no,scrollbars=0,resizable=no');
               var w = window.open('splash.html','new_win','fullscreen=yes,status=no,buttons=no,toolbar=no,location=no,scrollbars=0,resizable=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_width/2);
               return l;
          }
     
          function get_ltop ( p_height ){
               var t = (screen.availHeight/2)-(p_height/2);  
               return t;
          }
     //-->
     </SCRIPT>
     </HEAD>
     <BODY onload="javascript:openFlash()">
     </BODY>
</HTML>
     
====================== splash.html =====================

<HTML>
     <HEAD><TITLE>TESTING</TITLE>
     <SCRIPT language="javascript">
     <!--
          function handleOnLoad(){
               window.setTimeout("closeWin()",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:handleOnLoad()">
          <TABLE>
               <TR>
                    <TD valign="center" align="center">
                         <TABLE width="370px" height="100px">
                              <TR>
                                   <TD class="frame" valign="center" align="center">
                                        <IMG src="http://www.experts-exchange.com/v3.0/images/greyLogo.jpg">
                                   </TD>
                              </TR>
                         </TABLE>
                    </TD>
               </TR>
          </TABLE>
     </BODY>
</HTML>    
0
 
nimaigCommented:
Addition: Replace
body{
                   background-color : #D4D0C8;
                   border : thin outset;
              }


with the below :

body{
                    background-color : #D4D0C8;
                    border : thin outset;
                    scrollbar-3dlight-color : #D4D0C8;
                    scrollbar-arrow-color : #D4D0C8;
                    scrollbar-base-color : #D4D0C8;
                    scrollbar-darkshadow-color : #D4D0C8;
                    scrollbar-face-color : #D4D0C8;
                    scrollbar-highlight-color : #D4D0C8;
                    scrollbar-shadow-color : #D4D0C8;
                    scrollbar-track-color : #D4D0C8;
               }
0
 
MaxOvrdrv2Author Commented:
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
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now