JavaScript Brief

Published: Dec 22, 2000
Updated: Jul 16, 2021
3 minute read



The JavaScript Source: Messages: Welcome













Customize this Flash style intro to display a welcome message on your site. Awesome! To see how it works click here




The JavaScript Source: Messages: Welcome

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!


    

</p> <p><!– TWO STEPS TO INSTALL WELCOME:</p> <p> 1. Copy the coding into the HEAD of your HTML document<br /> 2. Add the onLoad event handler into the BODY tag –></p> <p><!– STEP ONE: Paste this code into the HEAD of your HTML document –></p> <p><HEAD></p> <p><SCRIPT LANGUAGE=”JavaScript”><br /> <!– Original: Kurt Grigg (kurt.grigg@virgin.net) –><br /> <!– Web Site: http://website.lineone.net/~kurt.grigg/javascript –></p> <p><!– This script and many more are available free online at –><br /> <!– The JavaScript Source!! http://javascript.internet.com –></p> <p><!– Begin<br /> message = “The JavaScript Source Free JavaScripts! Place your message here! “;<br /> colours = new Array(‘fff000′,’00ff00’)//Pick your colors, any amount.<br /> siZe = 20;//Explorer only! can be outrageous size.<br /> message = message.split(‘ ‘);<br /> timer = null;<br /> clrPos = 0;<br /> msgPos = 0;<br /> jog = 1;<br /> currentStep = 10;<br /> step = 8;<br /> ns = (document.layers)?1:0;<br /> viz = (document.layers)?’hide’:’hidden’;<br /> if (ns)<br /> document.write(“<div id=’T’ style=’position:absolute’></div><br>”);<br /> else {<br /> document.write(“<div style=’position:absolute’>”);<br /> document.write(“<div align=’center’ style=’position:relative’>”);<br /> document.write(“<div id=’T’ style=’position:absolute;width:0;height:0;font-family:Arial;font-size:0′>kurt</div>”);<br /> document.write(“</div></div><br>”);<br /> }<br /> function Message() {<br /> var pageHeight = (document.layers)?window.innerHeight:window.document.body.offsetHeight;<br /> var pageWidth = (document.layers)?window.innerWidth:window.document.body.offsetWidth;<br /> if (ns) {<br /> ypos = pageHeight / 2;<br /> var Write = ‘<div align=”center” style=”width:0px;height:0px;font-family:Arial,Verdana;font-size:’+currentStep/4+’px;color:’+colours[clrPos]+'”>’+message[msgPos]+'</div>’;<br /> document.T.top = ypos + -currentStep / 8 + window.pageYOffset;<br /> document.T.document.write(Write)<br /> document.T.document.close();<br /> }<br /> else {<br /> ypos = pageHeight / 2;<br /> xpos = pageWidth / 2;<br /> T.style.width = currentStep;<br /> T.style.pixelTop = ypos + -currentStep / 16 + document.body.scrollTop;<br /> T.style.pixelLeft = (xpos – 20)+ -currentStep / 2;<br /> T.style.fontSize = currentStep / 8;<br /> T.innerHTML = message&#9</p> <p>1;msgPos];<br /> T.style.color = colours[clrPos];<br /> }<br /> if (ns)step += 5;<br /> else step += 15;<br /> currentStep += step<br /> if (ns) {<br /> if (currentStep > pageWidth) {<br /> currentStep = 10;<br /> step = 8;<br /> msgPos += jog;<br /> clrPos += jog;<br /> }<br /> if (clrPos >= colours.length) clrPos = 0;<br /> }<br /> else {<br /> if (currentStep > pageWidth * siZe) {<br /> currentStep = 10;<br /> step = 8;<br /> msgPos += jog;<br /> clrPos += jog;<br /> }<br /> if (clrPos >= colours.length) clrPos = 0;<br /> }<br /> if (msgPos >= message.length) {<br /> clearTimeout(timer);<br /> if (ns) document.T.visibility = viz;<br /> else T.style.visibility = viz;<br /> }<br /> timer = setTimeout(“Message()”,40)<br /> }<br /> // End –><br /> </script></p> <p><!– STEP TWO: Insert the onLoad event handler into your BODY tag –></p> <p><BODY onLoad=”Message()”></p> <p><p><center><br /> <font face=”arial, helvetica” size”-2″>Free JavaScripts provided<br><br /> by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font><br /> </center><p></p> <p><!– Script Size: 2.93 KB –>
Did you use this script?  Do you like this site?  Please link to us!








 
[ Contact Us! ]

[ JavaScript Forum ]

[ Submit Your Script! ]

The JavaScript Source

Copyright 2000 Internet.com Corp.
All Rights Reserved. Legal Notices

Privacy Policy
Advertising Information


Internet News Logo

InternetNews is a source of industry news and intelligence for IT professionals from all branches of the technology world. InternetNews focuses on helping professionals grow their knowledge base and authority in their field with the top news and trends in Software, IT Management, Networking & Communications, and Small Business.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.