Go Back   DevHunters Webmaster Forum > Webmaster / Coding / Web Design Discussion > JavaScript Programming

JavaScript Programming Discuss javascript coding.

Open New Window Dropdown

This is a discussion on Open New Window Dropdown within the JavaScript Programming forums, part of the Webmaster / Coding / Web Design Discussion category; You can use this JavaScript to open a address in the new window.... detail Demo: Open New Window Dropdown How ...

Reply
 
LinkBack Thread Tools Display Modes
Old 08-02-2009, 08:14 AM   #1
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Open New Window Dropdown

You can use this JavaScript to open a address in the new window.... detail


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript
Code:
<script language="JavaScript">
function goThere()
{
 if (window.document.form_sites.select_sites.value.substring(0,7) == "http://" || window.document.form_sites.select_sites.value.substring(0,8) == "https://")
    { 
      the_site = window.open(window.document.form_sites.select_sites.value)
    }
 else
    {
     enterWebsite()
    }
}

function enterWebsite()
{
 if (window.document.form_sites.select_sites.value == "other")
    {
      prompt_url = prompt("ENTER WEB ADDRESS","http://")
    }
 if (prompt_url.substring(0,7) != "http://")
   {
    alert("PLEASE ADD THE  \"http://\" PREFIX")
   }
 else
   {
    window.open(prompt_url,"the_window")  
   }
 while (prompt_url.substring(0,7) != "http://")
   {
    enterWebsite()
   }
}
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Place HTML below in your BODY section
HTML
Code:
<form name="form_sites">
<select name="select_sites" onchange="goThere()">
  <option value="#">JavaScriptBank.com</option>
  <option value="#">JavaScriptBank.com</option>
  <option value="#">JavaScriptBank.com</option>
  <option value="https://www.THIS IS IN CASE YOU WANT TO ADD A  WEBSITE ON A SECURE SERVER (SPECIFY THE SITE).com">
	ADD WEBSITE DESCRIPTION HERE</option>
  <option value="other">Other...</option>

</select></form>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
JavaScriptBank is offline   Reply With Quote
Old 09-08-2009, 01:12 AM   #2
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Roulette

Select a new background color on this roulette wheel! Stop each wheel and hit 'view' to see that background color wheel combination! Cool!... detail


Demo: Roulette

How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript
Code:
<script language="javascript">
/*
     This script downloaded from www.JavaScriptBank.com
     Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
*/

// Michael Tartaglia (stonedstan@hotmail.com)

<!-- Begin
color=new Array("0","8","F");
speed=250;
document.bgColor="FFFFFF";
bg=new Array("FFFFFF","FFFFFF","FFFFFF");
function begin() {
document.form.col1.value=" X "; document.form.col2.value=" X ";
document.form.col3.value=" X "; i=0; roll(speed);
}
function roll(speedB) {
if (document.form.col1.value==" X ") {
document.form.c1.value=document.form.b1.value;
document.form.b1.value=document.form.a1.value;
document.form.a1.value=
color[Math.round(Math.random()*10)%3]+
color[Math.round(Math.random()*10)%3];
}
if (document.form.col2.value==" X ") {
document.form.c2.value=document.form.b2.value;
document.form.b2.value=document.form.a2.value;
document.form.a2.value=
color[Math.round(Math.random()*10)%3]+
color[Math.round(Math.random()*10)%3];
}
if (document.form.col3.value==" X ") {
document.form.c3.value=document.form.b3.value;
document.form.b3.value=document.form.a3.value;
document.form.a3.value=
color[Math.round(Math.random()*10)%3]+
color[Math.round(Math.random()*10)%3];
}
setTimeout("roll("+speedB+")",speedB);
}
function stop(col) {
if (col==1) {document.form.col1.value="   ";i++;}
if (col==2) {document.form.col2.value="   ";i++;}
if (col==3) {document.form.col3.value="   ";i++;}
if (i==3) {
bg[0]=document.form.a1.value+
document.form.a2.value+
document.form.a3.value;
bg[1]=document.form.b1.value+
document.form.b2.value+
document.form.b3.value;
bg[2]=document.form.c1.value+
document.form.c2.value+
document.form.c3.value;
speedB=500000;roll(speedB);
   }
}
function view(letter) {
document.bgColor=bg[letter];
document.form.color.value="#"+bg[letter];
}
// End -->
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Copy & Paste HTML code below in your BODY section
HTML
Code:
<form name="form">
<table cellpadding=2 border=1>
<tr><td align=center>
<input type=text name="a1" size=2 onFocus="this.blur()" value=" ">
<input type=text name="a2" size=2 onFocus="this.blur()" value=" ">

<input type=text name="a3" size=2 onFocus="this.blur()" value=" ">
<input type=button onClick="view(0)" value="View"><br>
<input type=text name="b1" size=2 onFocus="this.blur()" value=" ">
<input type=text name="b2" size=2 onFocus="this.blur()" value=" ">
<input type=text name="b3" size=2 onFocus="this.blur()" value=" ">
<input type=button onClick="view(1)" value="View"><br>
<input type=text name="c1" size=2 onFocus="this.blur()" value=" ">
<input type=text name="c2" size=2 onFocus="this.blur()" value=" ">
<input type=text name="c3" size=2 onFocus="this.blur()" value=" ">
<input type=button onClick="view(2)" value="View"><br>
<input type=button onClick="stop(1)" value=" X " name="col1"> 
<input type=button onClick="stop(2)" value=" X " name="col2"> 
<input type=button onClick="stop(3)" value=" X " name="col3"> 
         </td>
<td valign=middle align=center>
<input type=button onClick="begin()" value="Spin!">
<table bgcolor=FFFFFF border=1 cellspacing=0>

<tr><td align=center valign=middle>"X" stops each wheel.<p>
BG Color = <input type=text size=7 value="#FFFFFF" name=color>
</td></tr>
</table>
</td></tr>
</table>
</form>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
JavaScriptBank is offline   Reply With Quote
Old 09-14-2009, 08:23 AM   #3
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Rain/Snow effect without images

This is simply one of the most efficient, elegant rain/snow effects we've seen. Created without the aid of images, it's also hassle-free to install. Toggle between rain and snow effect with the change... detail


How to setup

Step 1: Use CSS code below for styling the script
CSS
Code:
<style>
.drop { position: absolute; width: 3;  filter: flipV(), flipH(); font-size: 20; color: red }
</style>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Place JavaScript below in your HEAD section
JavaScript
Code:
<script language="javascript">
//Rain/Snow effect- By Craig Blanchette Craiga.topcities.com
//Script featured on Dynamic Drive
//Visit http://www.dynamicdrive.com for this script and more

snow = false;    // false-rain;   true-snow
snowsym = " * "  //These are the symbols for each
rainsym = " ' "  //You can put images here.
howmany = 20     //How many drops/snowflakes?

/**************Do not need to change anything below***********/
if(snow){sym = snowsym; speed=1; angle=10; drops=howmany}
else{sym = rainsym; speed=50; drops=howmany; angle=6}
movex = -speed/angle; movey = speed; count = 0;

function moverain(){
for(move = 0; move < drops; move++){
xx[move]+=movex;  yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] < 0){xx[move] = maxx+10;}
if(yy[move] > maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+document.body.scrollTop;
}setTimeout('moverain()','1')}

</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 3: Copy & Paste HTML code below in your BODY section
HTML
Code:
<script language="javascript">

if (document.all){
drop = new Array(); xx = new Array(); yy = new Array(); mv = new Array()
ly = "document.all[\'"; st = "\'].style"
for(make = 0; make < drops; make++){
document.write('<div id="drop'+make+'" class=drop>'+sym+'</div>');
drop[make] = eval(ly+'drop'+make+st);
maxx = document.body.clientWidth-40
maxy = document.body.clientHeight-40
xx[make] = Math.random()*maxx;
yy[make] = -100-Math.random()*maxy;
drop[make].left = xx[make]
drop[make].top = yy[make]
mv[make] = (Math.random()*5)+speed/4;
drop[make].fontSize = (Math.random()*10)+20;
if(snow){col = 'white'}else{col = 'blue'}
drop[make].color = col;
}
window.onload=moverain
}
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->

Last edited by iowadawg; 10-25-2009 at 11:35 PM.
JavaScriptBank is offline   Reply With Quote
Old 09-21-2009, 06:07 AM   #4
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Dice Poker

Click [ROLL] to roll five dice. You win points by getting special combinations of dice, such as four of a kind, etc. Dice are shown but no image files are used! Change... detail


Demo: Dice Poker

How to setup

Step 1: Place CSS below in your HEAD section
CSS
Code:
<style>
.n2{
background-color: red;
color: black;
border: 0pt solid; **dot
}
.n1{
backgroud-color: black;
color: black;
border: 0pt solid;
}
</style>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Use JavaScript code below to setup the script
JavaScript
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin

// Andy Lad (mandy.beams@virgin.net)


char1="&nbsp;"
char2=unescape("%u2022")
numbers=new Array();
times=1;
function roll(a,b,c,d,e){
toroll=new Array(a,b,c,d,e);
towrite=""
towrite+='<form name="dgame"><table cellpadding="30" class="n1"><tr>';
for(j=0;j<5;j++){
if((j!=0)&&(j/5==Math.floor(j/5))){ towrite+="</tr><tr>" }
if((!toroll[j])&&(times==2)){
number=numbers[j];
}
else if((toroll[j])||(times==1)){
number=Math.floor(Math.random()*10 % 6)
number++;
}
towrite+="<td>";
switch(number){
// char1 = space; char2 = dot
case 1: holes=new Array(char1,char1,char1,char1,char2,char1,char1,char1,char1);	break;
case 2: holes=new Array(char2,char1,char1,char1,char1,char1,char1,char1,char2);	break;
case 3: holes=new Array(char2,char1,char1,char1,char2,char1,char1,char1,char2);	break;
case 4: holes=new Array(char2,char1,char2,char1,char1,char1,char2,char1,char2);	break;
case 5: holes=new Array(char2,char1,char2,char1,char2,char1,char2,char1,char2);	break;
case 6: holes=new Array(char2,char1,char2,char2,char1,char2,char2,char1,char2);	break;
case 7: holes=new Array(char2,char1,char1,char1,char1,char1,char1,char1,char1);	break;
}
towrite+='<table class="n2" border="0" cellpadding="0" cellspacing="0"><tr>';
for(i=0;i<3;i++){
towrite+='<td>&nbsp;'+holes[i]+'&nbsp;</td>n'
}
towrite+='</tr><tr>';
for(i=3;i<6;i++){
towrite+='<td>&nbsp;'+holes[i]+'&nbsp;</td>n'
}
towrite+='</tr><tr>';
for(i=6;i<9;i++){
towrite+='<td>&nbsp;'+holes[i]+'&nbsp;</td>n'
}
towrite+='</tr></table>'
if(times==1){
towrite+='<input type="checkbox" name="hold'+j+'"> Hold';
}
else{
if(!toroll[j]){ towrite+='Held' }
else if(toroll[j]){ towrite+='&nbsp;' }
}
numbers[j]=number;
towrite+='</td>'
}
if(times==1){ times++; }
else{ times--; }
if(dice>1) towrite+='</tr></table></form>';
document.all.dice.innerHTML=towrite;
return numbers;
}
function clickbutton(){
points=0;
win="nothing";
alpha=new Array("a","b","c","d","e");
types=new Array("ones","twos","threes","fours","fives","sixes");
if(times==1){
x=roll(1,1,1,1,1)
}
else{
a=(document.dgame.hold0.checked)?0:1
b=(document.dgame.hold1.checked)?0:1
c=(document.dgame.hold2.checked)?0:1
d=(document.dgame.hold3.checked)?0:1
e=(document.dgame.hold4.checked)?0:1
x=roll(a,b,c,d,e);
ones=0
twos=0
threes=0
fours=0
fives=0
sixes=0
//win checker
//counts how many of each number there is
for(k=0;k<5;k++){
	if(x[k]==1) ones++;
	if(x[k]==2) twos++;
	if(x[k]==3) threes++;
	if(x[k]==4) fours++;
	if(x[k]==5) fives++;
	if(x[k]==6) sixes++;
}
//alert(eval(types[0])+" onesn"+eval(types[1])+" twosn"+eval(types[2])+" threesn"+eval(types[3])+" foursn"+eval(types[4])+" fivesn"+eval(types[5])+" sixesn");
for(l=0;l<6;l++){
	if(eval(types[l])==3){
	points=1; win="Three of a kind";
	for(m=0;m<6;m++){
		if((eval(types[m])==2)&&(m!=l)){
		points=3; win="Full House (3 + 2 of a kind)";
		}
	}
}
if(eval(types[l])==4){ points=4; win="Four of a kind"; }
if(eval(types[l])==5){ points=10; win="Five of a kind"; }
//checks for one of every number except 6
if((eval(types[0])==1)&&(eval(types[1])==1)&&(eval(types[2])==1)&&(eval(types[3])==1)&&(eval(types[4])==1)){
win="Low Straight"; points="5"
}
//checks for one of every number except 1
if((eval(types[1])==1)&&(eval(types[2])==1)&&(eval(types[3])==1)&&(eval(types[4])==1)&&(eval(types[5])==1)){
win="High Straight"; points="6"
}
}
alert("You got "+win+"!nnThat's "+points+" points!");
total=parseInt(document.score.total.value);
total+=parseInt(points);
document.score.total.value=total;
}
}
//  End -->
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 3: Copy & Paste HTML code below in your BODY section
HTML
Code:
<input type="button" value="Roll"
onClick="clickbutton();"><p>
<span id="dice">Scoring:<br>
3 of a kind: 2 points<br>
4 of a kind: 4 points<br>
5 of a kind: 10 points<br>
Full House (3 + 2 of a kind): 3 points<br>
Low Straight (1,2,3,4,5): 5 points<br>
High Straight (2,3,4,5,6): 6 points<p>
Click ROLL to start</span><br>

<form name="score">Score: <input type="text" size="3"
name="total" onFocus="this.blur()" value="0">
</form>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->

Last edited by iowadawg; 10-25-2009 at 11:35 PM.
JavaScriptBank is offline   Reply With Quote
Old 09-28-2009, 09:49 AM   #5
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Worth your Weight in Gold

Does your self-worth appear low? Do you feel under-valued? Perhaps for specific reasons or a variance of them, this calculator code will cheer you up!... detail


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript
Code:
<script language="javascript">

<!--
var myWeight;
var myYearlySalary;
var myHomePrice;
//William Chinnick<chinwag@toast.net>_2007/WYWiG_Calc.,
//Atomic weight  AU=196.967 /Specific gravity AU=19.3*10years=.980,
//Cost of living of a 100 years duration,Entropy=.980,
//or dross factor approx=.010/year,
// Home costs approx.1/3 earnings.

// In Rumpleaustiltskin's postulate ->
//profitability of small business when a social democratic government regulates 
//the maximum starting minumum wage for employees@=> $7.00/hour, 
//brings a usurping of gold standard for the small business.

function HowMany(form)
{
var difference;
difference = (myYearlySalary * myWeight) * .980;
form.Gdiff.value = difference;
{
form.myHomePrice.value = (difference)/32;
}
if (difference < 100000) {
form.comment.value="You better start working!";
}
if (difference > 100001 && difference < 200000) {
form.comment.value="Try getting up earlier,you can do better.";
}
if (difference > 200001 && difference < 700000) {
form.comment.value="Very good! Ask the boss for a raise.";
}
if (difference > 700001 && difference < 1100000) {
form.comment.value="Should have clued into a perfect spouse's endowments,eh?!";
}
if (difference > 1100001 && difference < 1500000) {
form.comment.value="Your management material!";
}
if (difference > 1500001 && difference < 3200000) {
form.comment.value="Really, your fit for management team of a multinational corp.";
}
if (difference > 3200001) {
form.comment.value="No arguement here,you can afford exercise and a good vacation,."; 
}

}

function SetMyWeight(weight)
{
myWeight = weight.value;
}

function SetmyYearlySalary(dollar)
{
myYearlySalary = dollar.value;

}
function SetmyHomePrice(dollar)
{
myHomePrice = dollar.value;
}

function ClearForm(form){

form.myWeight.value = "";
form.myYearlySalary.value = "";
form.Gdiff.value = "";
form.myHomePrice.value = "";
form.comment.value = "";

}
// -->

</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Copy & Paste HTML code below in your BODY section
HTML
Code:
<form>
	<table border="1">
		<tr>
			<td><font color=blue>Your<br>Weight<br>(lbs.)</font color=blue></td>
			<td><font color=blue>Earned<br>($)dollars,<br>yearly</font color=blue></td>

			<td><input type="button" ONCLICK="HowMany(this.form)" VALUE="Compute"></td>
			<td><B><font color=gold>20 yr Career,<br>Worth your weight in Gold <br>dollars</font color=gold></B></td>
			<td><B><font color=gold>20 yr Career,<br>Good as Gold home price <br>allotment dollars</font color=gold></B></td>
		</tr>
		<tr>
			<td><input TYPE=text NAME=myWeight SIZE="6"ONCHANGE="SetMyWeight(this)"></td>

			<td><input TYPE=text NAME=myYearlySalary SIZE="6"ONCHANGE="SetmyYearlySalary(this)"></td>
			<td><input TYPE=BUTTON VALUE=" Reset " onClick="ClearForm(this.form)"></td>
			<td>$<input TYPE=text NAME="Gdiff" VALUE="" SIZE="8"></td>
			<td>$<input TYPE=text NAME="myHomePrice" VALUE="" SIZE="8"></td>
		</tr>
	</table>
	<table border="1">
		<tr>

		<TD><font color=blue>Revenuers Comment</font color=blue></TD>
		<TD><input TYPE=text NAME="comment" size="60"></td>
		</tr>
	</table>
</form>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->

Last edited by iowadawg; 10-25-2009 at 11:35 PM.
JavaScriptBank is offline   Reply With Quote
Old 09-28-2009, 03:04 PM   #6
New Hunter
 
Join Date: Jun 2009
Posts: 95
HB$ Balance: 0
vikaskaforum is on a distinguished road
iTrader: (0)
Default

thanks for sharing it with us
vikaskaforum is offline   Reply With Quote
Old 09-28-2009, 03:04 PM   #7
New Hunter
 
Join Date: Jun 2009
Posts: 95
HB$ Balance: 0
vikaskaforum is on a distinguished road
iTrader: (0)
Default

well I like this tutorial thanks for sharing information with us
vikaskaforum is offline   Reply With Quote
Old 10-05-2009, 10:19 AM   #8
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Fade Function script

This script creates a JavaScript function that fades HTML elements in or out. This script creates a JavaScript function to fade any HTML element in or out at a specified time frame. This could have an... detail


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript
Code:
<SCRIPT>
   var WAVSCRIPT_FADENUMBER=0
    function fade(){
    if(navigator.appName=="Microsoft Internet Explorer")
    {
    var WAVSCRIPT_DOMCHANGESTYLE="filter='alpha(opacity='+WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER+"+')'"
    }
    else
    {
    var WAVSCRIPT_DOMCHANGESTYLE="opacity=0+'.'+WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER
    }
   if(arguments[2]=="in")
   {
   document.write("<scr"+"ipt>var WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER+"=10;function WAVSCRIPT_FADEFUNCTION"+WAVSCRIPT_FADENUMBER+"(){document.getElementById('"+arguments[0]+"').style."+WAVSCRIPT_DOMCHANGESTYLE+";WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER+"++;timer"+WAVSCRIPT_FADENUMBER+"=setTimeout('WAVSCRIPT_FADEFUNCTION"+WAVSCRIPT_FADENUMBER+"()',"+arguments[1]+");if(WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER+"==99){clearTimeout(timer"+WAVSCRIPT_FADENUMBER+")}else{}}WAVSCRIPT_FADEFUNCTION"+WAVSCRIPT_FADENUMBER+"()</scr"+"ipt>")
   }
   else
   {
   document.write("<scr"+"ipt>var WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER+"=99;function WAVSCRIPT_FADEFUNCTION"+WAVSCRIPT_FADENUMBER+"(){document.getElementById('"+arguments[0]+"').style."+WAVSCRIPT_DOMCHANGESTYLE+";WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER+"--;timer"+WAVSCRIPT_FADENUMBER+"=setTimeout('WAVSCRIPT_FADEFUNCTION"+WAVSCRIPT_FADENUMBER+"()',"+arguments[1]+");if(WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER+"==10){WAVSCRIPT_FADEINCRIMENTVARIABLE"+WAVSCRIPT_FADENUMBER+"=0;document.getElementById('"+arguments[0]+"').style."+WAVSCRIPT_DOMCHANGESTYLE+";clearTimeout(timer"+WAVSCRIPT_FADENUMBER+");}else{}}WAVSCRIPT_FADEFUNCTION"+WAVSCRIPT_FADENUMBER+"()</scr"+"ipt>")
   }
  WAVSCRIPT_FADENUMBER++
  }
  </SCRIPT>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Place HTML below in your BODY section
HTML
Code:
<DIV id=t1 style="WIDTH: 100%">element 1 fades in at 100 89 milisecond 
	increments</DIV>
<DIV id=t2 style="WIDTH: 100%">element 2 fades out at 50 89 milisecond 
	increments</DIV>
<DIV id=t3 style="WIDTH: 100%">element 3 fades out at 20 89 milisecond 
	increments</DIV>
<DIV id=t4 style="WIDTH: 100%">element 4 fades in at 20 89 milisecond increments</DIV>
<SCRIPT>
   fade("t1",100,"in")
   fade("t2",50,"out")
   fade("t3",20,"out")
   fade("t4",20,"in")
  </SCRIPT>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->

Last edited by iowadawg; 10-25-2009 at 11:35 PM.
JavaScriptBank is offline   Reply With Quote
Old 10-12-2009, 10:04 AM   #9
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default JavaScript Countdown Timer

This JavaScript displays a countdown timer and alerts the user when the timer reaches zero. It then redirects to another Web ... detail


How to setup

Step 1: CSS below for styling thescript, place it into HEAD section
CSS
Code:
<style type="text/css">
#txt {
  border:none;
  font-family:verdana;
  font-size:16pt;
  font-weight:bold;
  border-right-color:#FFFFFF
}

</style>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Place JavaScript below in your HEAD section
JavaScript
Code:
<script language="javascript">
// Created by: Neill Broderick :: http://www.bespoke-software-solutions.co.uk/downloads/downjs.php

var mins
var secs;

function cd() {
 	mins = 1 * m("10"); // change minutes here
 	secs = 0 + s(":01"); // change seconds here (always add an additional second to your total)
 	redo();
}

function m(obj) {
 	for(var i = 0; i < obj.length; i++) {
  		if(obj.substring(i, i + 1) == ":")
  		break;
 	}
 	return(obj.substring(0, i));
}

function s(obj) {
 	for(var i = 0; i < obj.length; i++) {
  		if(obj.substring(i, i + 1) == ":")
  		break;
 	}
 	return(obj.substring(i + 1, obj.length));
}

function dis(mins,secs) {
 	var disp;
 	if(mins <= 9) {
  		disp = " 0";
 	} else {
  		disp = " ";
 	}
 	disp += mins + ":";
 	if(secs <= 9) {
  		disp += "0" + secs;
 	} else {
  		disp += secs;
 	}
 	return(disp);
}

function redo() {
 	secs--;
 	if(secs == -1) {
  		secs = 59;
  		mins--;
 	}
 	document.cd.disp.value = dis(mins,secs); // setup additional displays here.
 	if((mins == 0) && (secs == 0)) {
  		window.alert("Time is up. Press OK to continue."); // change timeout message as required
  		// window.location = "yourpage.htm" // redirects to specified page once timer ends and ok button is pressed
 	} else {
 		cd = setTimeout("redo()",1000);
 	}
}

function init() {
  cd();
}
window.onload = init;
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 3: Place HTML below in your BODY section
HTML
Code:
<form name="cd">
<input id="txt" readonly="true" type="text" value="10:00" border="0" name="disp">
</form>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->

Last edited by iowadawg; 10-25-2009 at 11:34 PM.
JavaScriptBank is offline   Reply With Quote
Old 10-19-2009, 04:09 AM   #10
New Hunter
 
Join Date: Jun 2009
Posts: 95
HB$ Balance: 0
vikaskaforum is on a distinguished road
iTrader: (0)
Default

Thanks for sharing this java script with us .
vikaskaforum is offline   Reply With Quote
Old 10-21-2009, 09:55 AM   #11
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Image slideshow transition

This JavaScript creates slideshow effect with one of transitions.... detail


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:
<script LANGUAGE="JavaScript1.1">
<!-- Beginning of JavaScript -

messages = new Array()
//anh dung de tao hieu ung
messages[0] = "<img src=logojs.gif>"
messages[1] = "<img src=photo1.jpg>"
messages[2] = "<img src=photo2.jpg>"
messages[3] = "<img src=photo3.jpg>"
messages[4] = "<img src=photo4.jpg>"

var i_messages = 0
var timer

function dotransition() {
    if (document.all) {
        content.filters[0].apply()
        content.innerHTML = messages[i_messages]
        content.filters[0].play()
        if (i_messages >= messages.length-1) {
            i_messages = 0
        }
        else {
            i_messages++
        }
    } 
    
    if (document.layers) {
       document.nn.document.write("<table cellspacing=2 cellpadding=2 border=0><tr><td align=left>"+messages[i_messages]+"</td></tr></table>")
		document.close()
        if (i_messages >= messages.length-1) {
            i_messages = 0
        }
        else {
            i_messages++
        }
    } 
    timer = setTimeout("dotransition()",5000)   
}
// - End of JavaScript - -->
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Place HTML below in your BODY section
HTML
Code:
<BODY onload="dotransition()">
<DIV id=content style="position: relative; width:160px; height:240px; text-align:center; filter: revealTrans(Transition=12, Duration=3)"></DIV>
</BODY>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->

Last edited by iowadawg; 10-25-2009 at 11:34 PM.
JavaScriptBank is offline   Reply With Quote
Old 10-25-2009, 10:19 PM   #12
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Web based Music Player

Bring the sound of life - music to your visitors by this JavaScript. It is an advanced web based midi player that actually enables you to jump, pause, and manipulate the play list like never before.... detail


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript
Code:
<SCRIPT language=JavaScript>
<!-- Begin
counter = 0;
html = true;
songs = new Array();
function addsong() {
file = document.forms[0].file.value;
if(file == "") {
alert("Entra un nombre de archivo o da click en Examinar..");
}
else {
fn = file;
while(fn.indexOf() != -1) {
pos = fn.indexOf();
fn = fn.substring(fn.lenght);
}
if(fn.indexOf(".gif") == 1) {
alert("Sólo sonidos o música");
}
else {
songs[counter] = file;
document.forms[0].selMusica[counter] = new Option(fn, file, false, true);
counter++;
}
document.forms[0].file.value = "";
}
}
function musica() {
document.all.sound.src=document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text;
}
function stop() {
document.all.sound.src="";
}
function count() {
document.clock.songs.value=document.clock.selMusica.options.length;
}
function deletethis() {
if(counter > 0) {
counter--;
document.forms[0].selMusica[counter] = null;
songs[counter] = "";
}
else {
alert("No hay nada en la lista!");
   }
}
function bajar() {
document.clock.selMusica.options[document.clock.selMusica.selectedIndex++];
saber2();
saber();
}
function subir() {
document.clock.selMusica.options[document.clock.selMusica.selectedIndex--];
saber2();
saber();
}
function saber() {
document.clock.url.value=document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text;
}
function saber2() {
fn = document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text;
char = unescape("%5C");
while(fn.indexOf(char) != -1) {
pos = fn.indexOf(char);
fn = fn.substring(pos + 1, fn.length);
document.clock.nombre.value=fn;
}
}
// End-->
</SCRIPT>
Step 2: Copy & Paste HTML code below in your BODY section
HTML
Code:
<BODY onclick=count() onload=count()>
<BGSOUND id=sound src="">
<FORM name=clock><INPUT type=file name=file size="20"> <INPUT onclick=addsong() type=button value=Add><INPUT onclick=deletethis() type=button value=Delete><BR><INPUT onclick=musica() type=button value=Listen name=empezar> 
<INPUT onclick=stop() type=button value=Stop name=detener> You have:<INPUT 
readOnly size=2 name=songs>song(s) in the list.<BR>Name of the song:<INPUT 
size=25 name=nombre><INPUT onclick="saber2(); saber()" type=button value="Know Name & Url">Url 
	of the song:<INPUT size=19 name=url> <BR><INPUT onclick=bajar() type=button value=MoveDown><INPUT onclick=subir() type=button value=MoveUp><BR><BR><SELECT 
multiple size=20 name=selMusica></SELECT> </FORM>
</BODY>

Last edited by iowadawg; 10-25-2009 at 11:32 PM. Reason: Use signature file please
JavaScriptBank is offline   Reply With Quote
Old 11-19-2009, 07:37 PM   #13
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Time Picker with child window

This JavaScript code - date picker helps you choose a time through a popup window. Perhaps this feature is not new on [URL="http://www.javascriptbank.com/"]J... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript
Code:
<script language="JavaScript" type="text/javascript" src="timePicker.js">
/*
	Bassem R. Zohdy | bassem.zohdy@gmail.com
*/
</script>
Step 2: Place HTML below in your BODY section
HTML
Code:
<form name="form1">
	<input id="field" onkeydown="time(this.id)"/>
</form>
Step 3: must download files below
Files
down.jpg
time.html
timePicker.js
up.jpg






JavaScriptBank is offline   Reply With Quote
Old 11-19-2009, 09:13 PM   Tweet this post! #14
Senior Staff
 
Hunter1's Avatar
 
Join Date: Mar 2007
Location: Indiana USA
Posts: 2,618
HB$ Balance: 18,026.33
Hunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant futureHunter1 has a brilliant future
iTrader: (9)
Default

Very nice indeed!

Thanks for sharing with the community!
__________________
AdBlurps.com Directory l
Hunter1 is offline   Reply With Quote
Old 11-22-2009, 08:07 PM   #15
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Fading Slide Show

Displays images continuously in a slideshow presentation format, with a fade effect on image transitions. (Fade in Internet Explorer 4+ only).... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:
<script>
/* 
	Original:  CodeLifter.com (support@codelifter.com)
	Web Site:  http://www.codelifter.com 
*/

// set the following variables
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'logojs.gif'
Pic[1] = 'photo3.jpg'
Pic[2] = 'logojs.gif'
Pic[3] = 'photo5.jpg'
Pic[4] = 'photo2.jpg'

// do not edit anything below this line

var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Copy & Paste HTML code below in your BODY section
HTML
Code:
<body onLoad="runSlideShow()">
<img id="VU" src="logojs.gif" name='SlideShow'>
</body>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->





JavaScriptBank is offline   Reply With Quote
Old 11-22-2009, 09:36 PM   Tweet this post! #16
Senior Moderator
 
Join Date: Jul 2008
Posts: 449
HB$ Balance: 189.00
iowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant futureiowadawg has a brilliant future
iTrader: (1)
Default

I merged all your threads together as basically you are just advertising your site.
iowadawg is offline   Reply With Quote
Old 11-22-2009, 10:34 PM   #17
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default

just posting helpful JS & their live demos
JavaScriptBank is offline   Reply With Quote
Old 11-29-2009, 07:12 PM   #18
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Virtual Keyboard

This JavaScript integrates complete virtual keyboard solution to the any web page. It does support mouse input, as well as keyboard input translation. Plain text and rich te... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript
Code:
<script type="text/javascript" src="vk_loader.js" ></script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Place HTML below in your BODY section
HTML
Code:
<form action="no.cgi" method="get">
      <div>
       Subject:<br />

       <input name="testa" id="testa" type="text" onfocus="VirtualKeyboard.attachInput(this)" /><br />
       Password (has keyboard animation disabled):<br />
       <input name="test_pwd" id="test_pwd" type="password" class="VK_no_animate" onfocus="VirtualKeyboard.attachInput(this)" /><br />
       Text:<br />
       <textarea name="testb" id="testb" type="text" cols="55" rows="10" wrap="soft" onfocus="VirtualKeyboard.attachInput(this)"></textarea>
       <br />
       <br />

       <div id="td"></div>
       <br />
       <input id="showkb" type="button" value="Keyboard" onclick="VirtualKeyboard.toggle('testb','td'); return false;" />
      </div>
      <div id="dbg">
      </div>
     </form>
     <script type="text/javascript">
         EM.addEventListener(window,'domload',function(){
             /*
             *  open the keyboard
             */
             VirtualKeyboard.toggle('testb','td');
             var el = document.getElementById('sul')
                ,lt = VirtualKeyboard.getLayouts()
                ,dl = window.location.href.replace(/[?#].+/,"")
             for (var i=0,lL=lt.length; i<lL; i++) {
                 var cl = lt[i];
                 cl = cl[0]+" "+cl[1];
                 lt[i] = "<a href=\""+dl+"?vk_layout="+cl+"\" onclick=\"VirtualKeyboard.switchLayout(this.title);return false;\" title=\""+cl+"\" alt=\""+cl+"\" >"+cl+"</a>"
             }
             el.innerHTML += "<li>"+lt.join("</li><li>")+"</li>";
         });
     </script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 3: must download files below
Files
Virtual_Keyboard.zip






JavaScriptBank is offline   Reply With Quote
Old 12-02-2009, 10:33 PM   #19
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Refresh Page - Automatic

Keep your content fresh. Use this JavaScript to automatically reload a fresh copy of your Web page from the server. You determine the time de... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript
Code:
<script type="text/javascript">
<!-- Begin
// Created by: Lee Underwood
function reFresh() {
  window.open(location.reload(true))
}
/* Set the number below to the amount of delay, in milliseconds,
you want between page reloads: 1 minute = 60000 milliseconds. */
window.setInterval("reFresh()",300000);
// End -->
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->





JavaScriptBank is offline   Reply With Quote
Old 12-07-2009, 08:27 PM   #20
New Hunter
 
Join Date: Jul 2009
Posts: 37
HB$ Balance: 0
JavaScriptBank is on a distinguished road
iTrader: (0)
Default Validate E-Mail

This JavaScript verifies that a string looks like a real e-mail address.... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:
<script language="javascript">
// Created by: Francis Cocharrua :: http://scripts.franciscocharrua.com/

function Validate_String(string, return_invalid_chars) {
  valid_chars = '1234567890-_.^~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  invalid_chars = '';
  if(string == null || string == '')
     return(true);

  //For every character on the string.   
  for(index = 0; index < string.length; index++) {
    char = string.substr(index, 1);                        
     
    //Is it a valid character?
    if(valid_chars.indexOf(char) == -1) {
      //If not, is it already on the list of invalid characters?
      if(invalid_chars.indexOf(char) == -1) {
        //If it's not, add it.
        if(invalid_chars == '')
          invalid_chars += char;
        else
          invalid_chars += ', ' + char;
      }
    }
  }
            
  //If the string does not contain invalid characters, the function will return true.
  //If it does, it will either return false or a list of the invalid characters used
  //in the string, depending on the value of the second parameter.
  if(return_invalid_chars == true && invalid_chars != '') {
    last_comma = invalid_chars.lastIndexOf(',');
    if(last_comma != -1)
      invalid_chars = invalid_chars.substr(0, $last_comma) + 
      ' and ' + invalid_chars.substr(last_comma + 1, invalid_chars.length);
    return(invalid_chars);
    }
  else
    return(invalid_chars == ''); 
}


function Validate_Email_Address(email_address){
  // Modified and tested by Thai Cao Phong, JavaScriptBank.com
  //Assumes that valid email addresses consist of user_name@domain.tld
  
  at = email_address.indexOf('@');
  dot = email_address.indexOf('.');

  if(at == -1 || 
    dot == -1 || 
    dot <= at + 1 ||
    dot == 0 || 
    dot == email_address.length - 1)
  {
  	alert("Invalid email");
    return(false);
  }
     
  user_name = email_address.substr(0, at);
  domain_name = email_address.substr(at + 1, email_address.length);                  

  if(Validate_String(user_name) === false || Validate_String(domain_name) === false)
  {
  	alert("Invalid email");
    return(false);
  }

  alert("Valid email");//return(true);
}
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Place HTML below in your BODY section
HTML
Code:
<form name=f>
<input type=text name=mail value="">
<input type=button value=Check onclick="Validate_Email_Address(document.f.mail.value)">
</form>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->





JavaScriptBank is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:40 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios