Fourni par Blogger.

dimanche 11 août 2013

Javascript Code: Make your website as user's Homepage

You can put a link in you website if they click on it then your page will be their home page

click here  to complete a survey to download a txt file wich contain the javascript code for free good luck




Compatible browsers:
IEFirefox


Javascript Code: Opening popup with the main page

Opening a popup with the current page, whenever a user opens it.

<SCRIPT LANGUAGE="JavaScript">

<!--

coffeeWin=window.open("","coffeeWin","toolbar=no,width=200,height=250,directories=no,menubar=no,SCROLLBARS=no");

coffeeWin.document.write("<HTML>");
coffeeWin.document.write("<HEAD>");

coffeeWin.document.write("</HEAD>");

coffeeWin.document.write("<BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#0000FF VLINK=#0000FF>")

coffeeWin.document.write("<CENTER>")

coffeeWin.document.write("<FONT FACE=VERDANA,ARIAL SIZE=2>");

coffeeWin.document.write("<B>");

coffeeWin.document.write("<FONT SIZE=3>Navigation Window</FONT>");

coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>");

coffeeWin.document.write("<A HREF=http://www.webloger.5u.com TARGET=MAIN>Webloger Website</A>");

coffeeWin.document.write("<P>");

coffeeWin.document.write("<A HREF=http://www.microsoft.com TARGET=MAIN>Microsoft</A>");

coffeeWin.document.write("<P>");

coffeeWin.document.write("<A HREF=http://www.netscape.com TARGET=MAIN>Netscape</A>");

coffeeWin.document.write("<P>");

coffeeWin.document.write("<A HREF=http://www.infoseek.com TARGET=MAIN>InfoSeek</A>");

coffeeWin.document.write("<P>");

coffeeWin.document.write("</B>");

coffeeWin.document.write("</FONT>");

coffeeWin.document.write("</BODY>");

coffeeWin.document.write("</HTML>");

//-->
</SCRIPT>
</HEAD>


<font face="Tahoma"><a target="_blank" href="http://javascriptcodefree.blogspot.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>








Compatible browsers:
IEFirefoxChromeSafariOpera


Text dance on page

Javascript Code: Text dance on page
An excellent effect on texts. They are dancing and shaking like a wave.


<script language="JavaScript1.2">
//configure message
message="Welcome to http://javascriptcodefree.blogspot.com/"
//animate text in NS6? (0 will turn it off)
ns6switch=1

var ns6=document.getElementById&&!document.all
mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
num=0;
num2=0;
txt="";
function jump0(){
if (ns6&&!ns6switch){
jump.innerHTML=message
return
}
if(message.length > 6){
for(i=0; i != message.length;i++){
txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};
jump.innerHTML=txt;
txt="";
jump1a()
}
else{
alert("Your message is to short")
}
}

function jump1a(){
nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0
nfinal.style.left=-num2;
if(num2 != 9){
num2=num2+3;
setTimeout("jump1a()",50)
}
else{
jump1b()
}
}

function jump1b(){
nfinal.style.left=-num2;
if(num2 != 0){num2=num2-3;
setTimeout("jump1b()",50)
}
else{
jump2()
}
}

function jump2(){
txt="";
for(i=0;i != message.length;i++){
if(i+num > -1 && i+num < 7){
txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
}
else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
}
jump.innerHTML=txt;
txt="";
if(num != (-message.length)){
num--;
setTimeout("jump2()",50)}
else{num=0;
setTimeout("jump0()",50)}}
</script>
</head>
<body>

<h2><div id="jumpx" style="color:green"></div></h2>
<script>
if (document.all||document.getElementById){
jump=(document.getElementById)? document.getElementById("jumpx") : document.all.jumpx
jump0()
}
else
document.write(message)
</script>


<font face="Tahoma"><a target="_blank" href="http://javascriptcodefree.blogspot.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>





Compatible browsers:
IEFirefoxChromeSafariOpera

Change status bar moving mouse on picture

<!-- This displays 'Your Message Here' in the status bar when the mouse -->
<!--    pointer is over the 'Put Image Here' image -->

<CENTER>
<A HREF="URL"  onMouseOver="window.status='Your Message Here'; return true"
onMouseOut="window.status=''">
<P><IMG SRC="http://www.javascriptfreecode.com/images/ci_1-small.jpg"></A>
</CENTER>

<!-- This displays 'Your Message Here' in the status bar when the mouse -->
<!--    pointer is over the 'Put Image Here' image -->

<CENTER>
<A HREF="URL"  onMouseOver="window.status='Your Message Here'; return true"
onMouseOut="window.status=''">
<P><IMG SRC="http://www.javascriptfreecode.com/images/ci_2-small.jpg"></A>
</CENTER>


<font face="Tahoma"><a target="_blank" href="http://javascriptcodefree.blogspot.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>




Compatible browsers:
IE

Javascript Code: Show popup when clicking on a button

<HTML>
<HEAD>
<!--START OF PopUp on Button Click-->

<SCRIPT LANGUAGE="JavaScript">
function AlertCC(label, msg)
{
  var cc1 =
    "<TITLE>Window Title</TITLE>" +
    "<BODY BGCOLOR='FFFFFF'><TABLE BORDER=0><TR>" +
        "<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+
        "<FONT SIZE=4 FACE=ARIAL>"

  var cc2 = "<FONT COLOR='FF0000'><B>"+label+"</B></FONT><BR><P>"

  var cc3 =
    "</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>"+
    "<TD VALIGN=BOTTOM ALIGN=RIGHT>"+
    "<FORM><INPUT TYPE='BUTTON' VALUE='Close Window'" +
                   "onClick='self.close()'>"  +
    "</FORM></TD></TR></TABLE></BODY>"


  popup = window.open("","popDialog","height=280,width=400,scrollbars=no")
  popup.document.write(cc1+cc2+msg+cc3)
  popup.document.close()
}

function ccalert1()
{
  AlertCC('Alert One', 'This script will let you place information about your product or topic of choice.')
}
function ccalert2()
{
  AlertCC('Alert Two', 'This script will let you place information about your product or topic of choice.')
}
function ccalert3()
{
  AlertCC('Alert Three', 'This script will let you place information about your product or topic of choice.')
}
function ccalert4()
{
  AlertCC('Alert Four', 'This script will let you place information about your product or topic of choice.')
}
</SCRIPT>
</HEAD>
<BODY>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert One ]" onClick="ccalert1()"></FORM></CENTER><p>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Two ]" onClick="ccalert2()"></FORM></CENTER><p>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Three ]" onClick="ccalert3()"></FORM></CENTER><p>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Four ]" onClick="ccalert4()"></FORM></CENTER><p>
<!-- END OF SCRIPT -->


<font face="Tahoma"><a target="_blank" href="http://javascriptcodefree.blogspot.com//"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>



Compatible browsers:
IEFirefoxChromeSafariOpera


Javascript Code: Show alert by click (msg box)

<!-- Start of Message Alert -->
<!-- Use this button in a form to pop-up a message when the user clicks it -->
<form>
<input type="button" value="message" onClick="alert('YOUR MESSAGE GOES HERE'); return true">
</form>
<!-- End of Message Alert -->
<font face="Tahoma"><a target="_blank" href="http://javascriptcodefree.blogspot.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>




Compatible browsers:
IEFirefoxChromeSafari

- See more at: http://www.javascriptfreecode.com/47.htm#sthash.irsI21zp.dpuf

Javascript Code: Text dance in status bar 1

<SCRIPT LANGUAGE="JavaScript">

var yourtext = "* YOUR MESSAGE HERE! *";
var wedge1="                        ";
var wedge2="                        ";
var message1=wedge1+yourtext+wedge2;
var dir = "lside";
var speed = 50;

function bouncey() {

if (dir == "lside") {
message2=message1.substring(2,message1.length)+"  ";
window.status=message2;
setTimeout("bouncey();",speed);
message1=message2;

if (message1.substring(0,1) == "*") {
dir="rside";
}
}

else {
message2="  "+message1.substring(0,message1.length-2);
window.status=message2;
setTimeout("bouncey();",speed);
message1=message2;
if (message1.substring(message1.length-1,message1.length) == "*") {
dir="lside";
}
}
}

</SCRIPT>

<body onLoad="bouncey()">
</body>
<font face="Tahoma"><a target="_blank" href="http://javascriptcodefree.blogspot.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>




Compatible browsers:
IEOpera


Make javascriptcodefree.blogspot.com your home page