»
EnglishFrenchVietnamese

Print - Animated Submit Buttons - JavaScriptBank.com

Full version: jsB@nk » Form » Button » Animated Submit Buttons
URL: http://www.javascriptbank.com/animated-submit-buttons.html

Animated Submit Buttons © JavaScriptBank.comThe script creates a growing button.

Full version: jsB@nk » Form » Button » Animated Submit Buttons
URL: http://www.javascriptbank.com/animated-submit-buttons.html



JavaScript
<SCRIPT language=JavaScript><!-- Hide this script from old browsers --   var i = 0;    var TextNumber = 0;   var TextInput = new Object();   var HelpText="";                                 var Text = "";     var Speed=300   var WaitSpace="  "                 TextInput[0] = "To Submit";TextInput[1] = "Click Here";TotalTextInput =1;for (var addWait = 0; addWait <= TotalTextInput; addWait++)    { TextInput[addWait]+=WaitSpace; }var TimerIdvar TimerSet=false;function startBanner (form)     {   if (!TimerSet)      {      TimerSet=true;      banner();      }   }function banner()    {   Text=rollMessage();   TimerId = setTimeout("banner()", Speed);   document.form2.banner.value=Text;   }function rollMessage ()    {   Wait_yn=false;   i++;   var CheckSpace = HelpText.substring(i-1, i);   CheckSpace = "" + CheckSpace;   if (CheckSpace == " ")       {i++;}   if (i >= HelpText.length+1)       {      i=0;       if (TextNumber < TotalTextInput)          {TextNumber++;}       else          {TextNumber = 0;}       initBanner();      }   Text = HelpText.substring(0, i);   return (Text);   }function initBanner()    {   Text = TextInput[TextNumber];   HelpText = Text;startBanner ();   }function stopBanner()    {   TimerSet=false;    clearTimeout (TimerId);   }function resetBanner()   {   TimerSet=false;    clearTimeout (TimerId);   TextNumber=0;   i=0;   Speed=300;   document.form2.banner.value=" ";   initBanner();      }// -- End Hiding Here --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=banner()><FORM name=form2 action=http://javascriptbank.com/><!-- Replace the 'onSubmit=null' with 'action=[blah.html]' --><INPUT onclick="alert('Neat, isn\'t it?')" type=submit value=..Submit.. name=banner> <BR></FORM></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->