Submission Chamber Logo

JavaScript
Here you will find a few scripts that are not only helpful but also really cool. You can surf the internet for tons and tons of free scripts so what ever you need to do at your site then you should be able to find some type of script to make it happen.

Rotating Banner
Copy and paste between your <HEAD> and </HEAD> tags and be sure to change whats in Italics to match the graphic name and domain names. If you would like to add more banners then copy another ADS LINE and NEWPLACE LINE. Be sure to change the numbers also: from 2 to 3 in the ARRAY and also COUNTER to be the number of banners you are using. The yellow area is the timer which allows you to set the number of seconds a banner is displayed before moving on to the next one.

<script LANGUAGE="JavaScript">
<!-- Beginning of JavaScript -

if (document.images) {
ads = new Array(>2);
ads[0] = "bannername.gif";
ads[1] = "bannername2.gif";
}

newplace = new Array(2);
newplace[0] = "http://www.someonesdomainname.com/"
newplace[1] = "http://www.someonesdomainname.com/"

var timer = null
var  counter = 0

function banner() {
     timer=setTimeout("banner()", 4000);
  counter++;
  if (counter >= 2)
  counter = 0;
  document.bannerad.src = ads[counter];
}

function gothere() {
  counter2 = counter;
  window.location.href = newplace[counter2];
}

// - End of JavaScript - -->
</script>

Copy and paste between your <body> and </body> tags:

<a href="javascript:gothere()"><img SRC="bannername2.gif" NAME="bannerad" BORDER=0 height=60 width=468></a></td>

Current Date
This script will display the current date and update every day. Just copy into your HTML page at the place you want it to be and you're done.

<script LANGUAGE="JavaScript"><!--
function makeArray() {var args = makeArray.arguments;for (var i = 0; i < args.length; i++) {this[i] = args[i];} this.length = args.length;}

 function fixDate(date) {var base = new Date(0);var skew = base.getTime();if (skew > 0)date.setTime(date.getTime() - skew);}

 function getString(date)
{var months = new makeArray("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

 return months[date.getMonth()] + " " + date.getDate() + ", " + date.getYear();}

 var cur = new Date(); fixDate(cur); var str = getString(cur);
document.write(str);
// --></script>

Pop-up with a Question
This little script will allow you to bring a pop-up with any question you need to ask the visitor. If they answer yes to the question they will be allowed to enter your site.

Just Copy and Paste the code below between your <HEAD> and </HEAD> tags at the top of your HTML document. Be sure to change the domain name to reflect the site you want visitors to go.

<script LANGUAGE="JavaScript">
self.blur();
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)
if (confirm("INSERT YOUR TEXT HERE"))
{window.open('http://www.yourdomainname.com', 'Vote');}
</script>

Return to Help Guides



Copyright © 2001-2006 Submission Chamber.
The Submission Chamber contains adult material and is intended for adults 18 years & over!
Duplication, publication or distribution of this site in part or in whole is strictly prohibited.