04 August 2009

Make a Splash Page Script

You may not know what it is to Splash Page Script http://mp3-downloadmusicord.blogspot.com/ this sample demo how interested after seeing the demo just follow the steps below :

Step 1 : Copy the script below and paste under the ]]></b:skin>

<script type="text/javascript" src="splashpage.js">

/***********************************************
* Splash Page script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

Step 2 : Download the below .js file and image, which are also referenced by the code above, and upload to your site:

  • splashpage.js (Right click, and select "Save As").
  • (the two images used by default for the Splash Page's Header bar)

That's it! Inside splashpage.js, you'll want to configure a few variables, such as the URL to the page to show as the splash page, frequency control etc.

Configuration Help

The main settings for this script are done inside splashpage.js. Open the file using any text editor, and configure the first few variables:

// Splash Page Script Activation (1=enabled, 0=completely disabled!)
splashenabled: 1,

//1) URL to file on your server to display as the splashpage
splashpageurl: "http://images.google.com/",

//2) Enable frequency control? (1=yes, 0=no)
enablefrequency: 0,

//3) display freqency: "sessiononly" or "x days" (string value). Only applicable if 3) above is enabled
displayfrequency: "2 days",

//4) HTML for the header bar portion of the Splash Page
// Make sure to create a link that calls "javascript:splashpage.closeit()")
// An IE bug means you should not right align any image within the bar, but instead use "position:absolute" and the "right" attribute

defineheader: '<div style="padding: 5px; color: white; font: bold 16px Verdana; background: black url(blockdefault.gif) center center repeat-x;"><a style="position:absolute; top: 2px; right: 5px" href="javascript:splashpage.closeit()" title="Skip to Content"><img src="skip.gif" border="0" width="114px" height="23px" /></a>Bought to you by Google Images...</div>',

//5) cookie setting: ["cookie_name", "cookie_path"]
cookiename: ["splashpagecookie", "path=/"],

//6) Auto hide Splash Page after x seconds (Integer value, 0=no)?
autohidetimer: 15,

Here's an explanation of each of these variables:

  1. splashpageurl : Full URL to the page you wish to show as the splash page. While this can either be a page on your server or the web at large, note that in the later case, it may not always work reliably. Some sites have scripts on their pages that will throw an error when the page is contained in an IFRAME, or even break out of the frame altogether. Also, if you want the links inside the splash page to open in a new window, for example, you can't do so on external site pages.
  2. enablefrequency : Set to 1 to enable frequency control, 0 to disable it (so splash page shows each time page loads!).
  3. displayfrequency : If proceeding variable set to 1, specify the desired frequency. Valid values are either "sessiononly", or "x days", such as "5 days".
  4. defineheader : The HTML to use for the header bar, displayed above the IFRAME actually holding the splash page. It should contain link(s) that enable the visitor to dismiss the splash page, by using the URL "javascript:splashpage.closeit()".
  5. cookiename : Array containing the desired name to use when setting the JavaScript cookie, plus the cookie path, respectively.
  6. autohidetimer : Controls whether to automatically close the Splash Page after x seconds. Enter 0 for no, or an integer in seconds, such as 15.


VIEW DEMO THIS TUTORIAL HERE

Time to make a splash!

No comments:

Post a Comment