BluePink BluePink
XHost
Oferim servicii de instalare, configurare si monitorizare servere linux (router, firewall, dns, web, email, baze de date, aplicatii, server de backup, domain controller, share de retea) de la 50 eur / instalare. Pentru detalii accesati site-ul BluePink.
enter page web design web resource entertainment personals  

Tricks: How to...
Image effects:
› Preload images
› Preload images 2
› Swap images
› Swap images 2
› View larger image
› Image transparency
› Image slideshow
Special effects:
› Border
› Border 2
› Watermark
› Scroller
› Scroller 2
› Link hover color
› Custom cursor
› Snowing
› Auto window resizer
› Link tips
› Popup
Buttons & menus:
› Back button
› Java buttons
› Flat buttons
› Slide menu
› Drop down menu
› Alphabet menu
Mouse effects:
› Elastic mouse
› Mouse snake
› Mouse stars
› Mouse orbit
› Mouse eyes
Text generators:
› Infobox
› Quote generator
› Fading messages
› Text fader
› Text glow
› Credits

home > real world > web resource > web source codes >

STEP 1/2: Put this code into the <HEAD> of your HTML document:

<HEAD>
<!-- INFOBOX CODE -->
<SCRIPT LANGUAGE="JavaScript">
var CurrentMsg = 'hello ';
function update(msg) {
var pad_str="";
n = msg.length;
if(n<70) {
pad = (71-n)/2;
for(var i=0; i pad_str+=" ";
}
}
CurrentMsg = pad_str + msg;
document.messages.field.value = CurrentMsg;
clearTimeout(timer);
timer = setTimeout("idleMsg()",2000);
}
function MakeArray(n) {
this.length=n;
for(var i = 1; i<= n; i++) {
this[i] = "";
}
return(this);
}
var index = 1;
var notice_num = 10;
var notices = new MakeArray(notice_num);
notices[1] = "Welcome to The JavaScript Source Information Bar!";
notices[2] = "This is another neat script that I ran into in my travels...";
notices[3] = "You can use this script on your own web page to easily";
notices[4] = "and effectively present any information you want.";
notices[5] = "Could you picture what you could do with this?";
notices[6] = "Maybe display events, notices, or whatever works for you.";
notices[7] = "Well, take this script, and let me know how it turns out.";
notices[8] = "I forget to mention you can change the speed";
notices[9] = "Just change (\"idleMsg()\",4000) to the speed you want.";
notices[10] = "Be sure to remember that the time is in ms! Repeating...";
var timer = setTimeout('idleMsg()',2000);
function nochange() {
document.messages.field.value = CurrentMsg;
}
function idleMsg() {
update(notices[index++]);
if(index>notice_num) {
index=1;
}
}
</SCRIPT>
</HEAD>


STEP 2/2: Put this code into the <BODY> of your HTML document:

<BODY>
<CENTER>
<FORM name="messages" onSubmit="return false">
<input type="text" name="field" size=70 value="" onFocus="self.status='This is a JavaScript info. field'; return true" onChange="nochange()">
</FORM>
</CENTER>
</BODY>

Now change your "notices[x]" as you desire.

You're done.

© copyright 2004 - DigitalElf.ro - marian_dumitriu@yahoo.com