TITULKOVAC

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

123
p123.html / p123.zip
Pohybujuci sa text v tlacitku s moznostou odskoku na rozne stranky
5240b
NN 4.04, IE 4.0

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code (p123.html):

<html> <head> <title>JavaScript DESTINATION - P123</title> </head> <frameset rows="55, *" frameborder="0" border="0"> <frame src="p123-1.html" name="frm_headliner" marginwidth="5" marginheight="5" noresize scrolling="no"> <frameset cols="200, *" frameborder="0" border="5"> <frame src="p123-2.html" name="frm_left" marginwidth="1" marginheight="5" noresize scrolling="no"> <frame src="p123-3.html" name="frm_main" marginwidth="5" marginheight="5" noresize scrolling="auto"> </frameset> </frameset> </html>

Zdrojovy tvar / Source code (p123-1.html):

<html> <head> <title></title> <style type="text/css"> input {cursor: hand} .stHeadliner {font-family: courier new, monospace; font-size: 11pt; font-weight: bold; font-style: italic; background: red; color: white} </style> <script language="JavaScript"> <!-- growWait=90; blinkTextWait=1000; blinkSpacesWait=300; blinkMax=8; expandWait=100; scrollWait=90; scrollWidth=40; lineMax=5 lines=new Array(lineMax); lines[1]=new Line("Toto je ukazka prace titulkovaca","p123.html","top",Blink,500); lines[2]=new Line("Klikni sem a precitaj si Pavucinu","http://www.pavucina.sk","frm_main",Expand,2000); lines[3]=new Line("Mozes zmenit lubovolny ramec","p123-4.html","frm_left",Scroll,1000); lines[4]=new Line("Napriklad aj tento", "p123-5.html","frm_main",Static,2500); lines[5]=new Line("Poslite mi postu !","mailto:webmaster@javascript.sk","top",Grow,3000); lineText=""; timerID=null; timerRunning=false; spaces=""; charNo=0; charMax=0; charMiddle=0; lineNo=0; lineWait=0; function Line(text, url, frame, type, wait) { this.text=text; this.url=url; this.frame=frame; this.Display=type; this.wait=wait; } function StringFill(c, n) { s=""; while (--n >= 0) s+=c; return s; } function Static() { document.formDisplay.buttonFace.value=this.text; timerID=setTimeout("ShowNextLine()",this.wait); } function Grow() { lineText=this.text; lineWait=this.wait; charMax=lineText.length; TextGrow(); } function TextGrow() { if (charNo<=charMax) { document.formDisplay.buttonFace.value=lineText.substring(0,charNo); charNo++; timerID=setTimeout("TextGrow()",growWait); } else { charNo=0; timerID=setTimeout("ShowNextLine()",lineWait); } } function Blink() { lineText=this.text; charMax=lineText.length; spaces=StringFill(" ",charMax); lineWait=this.wait; TextBlink(); } function TextBlink() { if (charNo<=blinkMax * 2) { if ((charNo%2)==1) { document.formDisplay.buttonFace.value=lineText; blinkWait=blinkTextWait; } else { document.formDisplay.buttonFace.value=spaces; blinkWait=blinkSpacesWait; } charNo++; timerID=setTimeout("TextBlink()",blinkWait); } else { charNo=0; timerID=setTimeout("ShowNextLine()",lineWait); } } function Expand() { lineText=this.text; charMax=lineText.length; charMiddle=Math.round(charMax/2); lineWait=this.wait; TextExpand(); } function TextExpand() { if (charNo<=charMiddle) { document.formDisplay.buttonFace.value=lineText.substring(charMiddle-charNo,charMiddle+charNo); charNo++; timerID=setTimeout("TextExpand()",expandWait); } else { charNo=0; timerID=setTimeout("ShowNextLine()",lineWait); } } function Scroll() { spaces=StringFill(" ",scrollWidth); lineText=spaces+this.text; charMax=lineText.length; lineText+=spaces; lineWait=this.wait; TextScroll(); } function TextScroll() { if (charNo<=charMax) { document.formDisplay.buttonFace.value=lineText.substring(charNo,scrollWidth+charNo); charNo++; timerID=setTimeout("TextScroll()",scrollWait); } else { charNo=0; timerID=setTimeout("ShowNextLine()",lineWait); } } function StartHeadliner() { StopHeadliner(); timerID=setTimeout("ShowNextLine()",1000); timerRunning=true; } function StopHeadliner() { if (timerRunning) { clearTimeout(timerID); timerRunning=false; } } function ShowNextLine() { (lineNo<lineMax)?lineNo++:lineNo=1; lines[lineNo].Display(); } function GotoUrl(url, frame) { top.frames[frame].location.href=url; } // --> </script> </head> <body onLoad="StartHeadliner()" onUnload="StopHeadliner()"> <center> <form name="formDisplay"> <input class="stHeadliner" type="button" name="buttonFace" value="------ WWW.JAVASCRIPT.SK ------" onClick="GotoUrl(lines[lineNo].url,lines[lineNo].frame)"></input> </form> </center> </body> </html>

Zdrojovy tvar / Source code (p123-2.html):

<html> <head> </head> <body> Toto je ramec <br> v lavej casti <br> obrazovky... </body> </html> <XMP> </td> </tr> </table> </center> <h4 align="center">Zdrojovy tvar / Source code (p123-3.html):</h4> <center> <table border="1" cellpadding="5" cellspacing="0"> <tr> <td> <XMP> <html> <head> </head> <body> Toto je dalsi ramec... </body> </html>

Zdrojovy tvar / Source code (p123-4.html):

<html> <head> </head> <body> <font color="red" size="4"> <pre> WOW, nieco sa tu zmenilo... </pre> </font> </body> </html>

Zdrojovy tvar / Source code (p123-5.html):

<html> <head> </head> <body> <font color="green" size="4"> A teraz tu mame novy text... </font> </body> </html>
[ Navrat / BACK ]