Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Integrating splash page on a site

Options
  • 24-09-2009 11:29pm
    #1
    Registered Users Posts: 2,789 ✭✭✭


    I've got this code that I'd like to use for a splash page. I like that I can use this instead of flash and that I can keep the code in my index.html page (not having to use two separate pages). I'm very green to web design, but I am learning lots by stumbling about :/
    head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script>
    function SplashBeGone() {
      document.getElementById('splash').style.display = 'none';
    }
    function Init() {
      document.getElementById('splash').style.display = 'block';
      setTimeout(function(){ SplashBeGone(); }, 8000);
    }
    window.onload = Init;  
    </script>
    
    <style type="text/css">
    #splash {
     position: absolute;
     display: none;
     top: 0; left: 0;
     width: 100%;
     height: 100%;
     text-align: center;
     background: #ff0;
     opacity: .8;
    }
    </style>
    </head>
    
    <body>
    Site
    <div id="splash">
      <p>splash</p>
      <p><a href="#" onclick="SplashBeGone(); return false;">skip</a></p>
    </div>
    </body>
    </html>
    

    However, when I try and place it into my existing code it fails. Here's the code I have to work with. (There's alot of it to work the menus). If I take the onLoad= out from my <body> tag it works again, so I'm guessing there a conflict there.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Welcome</title>
    <meta name="description" content="SNIP">
    <meta name="keywords" content="SNIP">
    <meta name="robots" content="all">
    <meta name="robots" content="index,follow">
    <meta name="language" content="English">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="styles.css" rel="stylesheet" type="text/css">
    <script language="JavaScript">
    <!--
    function mmLoadMenus() {
      if (window.mm_menu_0515130918_0) return;
            window.mm_menu_0515130918_0 = new Menu("root",103,18,"Verdana, Arial, Helvetica, sans-serif",12,"#CC0000","#990000","#FFFFFF","#FFFFFF","left","middle",3,0,500,-5,7,true,true,true,12,true,true);  mm_menu_0515130918_0.addMenuItem("SNIP","location='SNIP'");
      mm_menu_0515130918_0.addMenuItem("SNIP","location='SNIP'");
      mm_menu_0515130918_0.addMenuItem("SNIP","location='SNIP'");
       mm_menu_0515130918_0.hideOnMouseOut=true;
       mm_menu_0515130918_0.bgColor='#FFFFFF';
       mm_menu_0515130918_0.menuBorder=1;
       mm_menu_0515130918_0.menuLiteBgColor='#FFFFFF';
       mm_menu_0515130918_0.menuBorderBgColor='#FFFFFF';
    window.mm_menu_0515131415_0 = new Menu("root",174,18,"Verdana, Arial, Helvetica, sans-serif",12,"#CC0000","#990000","#FFFFFF","#FFFFFF","left","middle",3,0,500,-5,7,true,true,true,12,true,true);
      mm_menu_0515131415_0.addMenuItem("SNIP","location='SNIP'");  mm_menu_0515131415_0.addMenuItem("SNIP","location='SNIP'");
      mm_menu_0515131415_0.addMenuItem("SNIP","location='SNIP'");
       mm_menu_0515131415_0.hideOnMouseOut=true;
       mm_menu_0515131415_0.bgColor='#FFFFFF';
       mm_menu_0515131415_0.menuBorder=1;
       mm_menu_0515131415_0.menuLiteBgColor='#FFFFFF';
       mm_menu_0515131415_0.menuBorderBgColor='#FFFFFF';
    window.mm_menu_0515131628_0 = new Menu("root",156,18,"Verdana, Arial, Helvetica, sans-serif",12,"#CC0000","#990000","#FFFFFF","#FFFFFF","left","middle",3,0,500,-5,7,true,true,true,12,true,true);  mm_menu_0515131628_0.addMenuItem("SNIP","location='SNIP'");
      mm_menu_0515131628_0.addMenuItem("SNIP","location='SNIP'");
       mm_menu_0515131628_0.hideOnMouseOut=true;
       mm_menu_0515131628_0.bgColor='#FFFFFF';
       mm_menu_0515131628_0.menuBorder=1;
       mm_menu_0515131628_0.menuLiteBgColor='#FFFFFF';
       mm_menu_0515131628_0.menuBorderBgColor='#FFFFFF';
        window.mm_menu_0515132019_0 = new Menu("root",143,18,"Verdana, Arial, Helvetica, sans-serif",12,"#CC0000","#990000","#FFFFFF","#FFFFFF","left","middle",3,0,500,-5,7,true,true,true,12,true,true);
      mm_menu_0515132019_0.addMenuItem("SNIP","location='SNIP'");
      mm_menu_0515132019_0.addMenuItem("SNIP","location='SNIP'");
      mm_menu_0515132019_0.addMenuItem("SNIP","location='SNIP'");
      mm_menu_0515132019_0.addMenuItem("SNIP","location='SNIP'");
       mm_menu_0515132019_0.hideOnMouseOut=true;
       mm_menu_0515132019_0.bgColor='#FFFFFF';
       mm_menu_0515132019_0.menuBorder=1;
       mm_menu_0515132019_0.menuLiteBgColor='#FFFFFF';
       mm_menu_0515132019_0.menuBorderBgColor='#FFFFFF';          window.mm_menu_0515133506_0 = new Menu("root",125,18,"Verdana, Arial, Helvetica, sans-serif",12,"#CC0000","#990000","#FFFFFF","#FFFFFF","left","middle",3,0,500,-5,7,true,true,true,12,true,true);
      mm_menu_0515133506_0.addMenuItem("SNIP","location='SNIP'");    mm_menu_0515133506_0.addMenuItem("SNIP","MM_openBrWindow('SNIP')");
    mm_menu_0515133506_0.hideOnMouseOut=true;
       mm_menu_0515133506_0.bgColor='#FFFFFF';
       mm_menu_0515133506_0.menuBorder=1;
       mm_menu_0515133506_0.menuLiteBgColor='#FFFFFF';
       mm_menu_0515133506_0.menuBorderBgColor='#FFFFFF';    window.mm_menu_0827101329_0 = new Menu("root",104,18,"Verdana, Arial, Helvetica, sans-serif",12,"#CC0000","#990000","#FFFFFF","#FFFFFF","left","middle",3,0,500,-5,7,true,true,true,12,true,true);
      mm_menu_0827101329_0.addMenuItem("SNIP","location='html/SNIP'");
      mm_menu_0827101329_0.addMenuItem("SNIP","location='html/SNIP'");
      mm_menu_0827101329_0.addMenuItem("SNIP","location='html/SNIP'");
       mm_menu_0827101329_0.hideOnMouseOut=true;
       mm_menu_0827101329_0.bgColor='#FFFFFF';
       mm_menu_0827101329_0.menuBorder=1;
       mm_menu_0827101329_0.menuLiteBgColor='#FFFFFF';
       mm_menu_0827101329_0.menuBorderBgColor='#FFFFFF';                  window.mm_menu_0506113122_0 = new Menu("root",109,18,"Verdana, Arial, Helvetica, sans-serif",12,"#CC0000","#990000","#FFFFFF","#FFFFFF","left","middle",3,0,500,-5,7,true,true,true,12,true,true);
      mm_menu_0506113122_0.addMenuItem("SNIP","window.open('http://SNIP', '_blank');");
       mm_menu_0506113122_0.hideOnMouseOut=true;
       mm_menu_0506113122_0.bgColor='#FFFFFF';
       mm_menu_0506113122_0.menuBorder=1;
       mm_menu_0506113122_0.menuLiteBgColor='#FFFFFF';
       mm_menu_0506113122_0.menuBorderBgColor='#FFFFFF';
    
    mm_menu_0506113122_0.writeMenus();
    } // mmLoadMenus()
    
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    }
    //-->
    </script>
    <script language="JavaScript" src="html/mm_menu.js"></script>
    </head>
    
    <body bgcolor="#CCCCCC" background="images/centra_template/background_tile.gif" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" onLoad="MM_preloadImages('images/SNIP.gif')">
    The rest of the site
    </body>
    


Comments

  • Registered Users Posts: 6,491 ✭✭✭daymobrew


    Don't use a splash page. Most people hate them - it is an unnecessary wait for the splash page stuff to load and an extra click to get past the darn thing.


  • Registered Users Posts: 910 ✭✭✭tombull82


    daymobrew wrote: »
    Don't use a splash page. Most people hate them - it is an unnecessary wait for the splash page stuff to load and an extra click to get past the darn thing.

    +1... hate them:mad:


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    +1 here as well; plus, if your site is working properly in search engines, most people won't even see it.


  • Closed Accounts Posts: 1,362 ✭✭✭the Guru


    grizzly, I agree with the others posters 100% -- “DO NOT USE A SPLASH PAGE EVER" as an intro to a site. Most experienced web users hate them, and will refuse to click through / skip the presentation to visit your site.

    However, here is a good article for you to read on the subject.

    http://www.smashingmagazine.com/2007/10/11/splash-pages-do-we-really-need-them/


  • Registered Users Posts: 2,789 ✭✭✭grizzly


    Thanks for the replies. Unfortunately I've no say in the matter – client wants it and won't hear otherwise.


  • Advertisement
Advertisement