UBB.Dev
Posted By: havoq Javascript Scroller Loop Help - 07/02/2004 4:57 PM
I need help to make this script automatically loop and not stop after its done scrolling. Upon load, I want it to begin scrolling and right now it doesn't.

http://www.gdevresources.com/Pages/Scripts/Dynamicscroller/DScroller.shtml

Its the SINGLE SCROLLER demo

any help to make it loop upon start and finish?
Posted By: havoq Re: Javascript Scroller Loop Help - 07/07/2004 12:42 AM
Ok well I figured that part out. However now -->

Everytime I click on Bold, Italic etc, in sentence 2 3 4 or whatever. The javascript command puts it in textarea 1 instead of 2 3 or 4.

How can I make it so that, if I click on Bold, Italic etc, the appropriate command will goto the appropriate textarea??

Code
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function View(form) {
msg=open("","DisplayWindow","status=1,scrollbars=1");
msg.document.write(form.Text2.value);
}
function Generate(form) {
var txt="<html><HEAD><TITLE>"+form.Name.value+"</TITLE></HEAD>rn";
txt+="</font></body></html>";
form.Text2.value=txt;
}
function AddText(form, Action){
var AddTxt="";
var txt="";

if(Action==4) {
txt=prompt("Text to be made BOLD.","Text");
if(txt!=null)
AddTxt="<b>"+txt+"</b>";
}
if(Action==5) {
txt=prompt("Text to be italicized","Text");
if(txt!=null)
AddTxt="<i>"+txt+"</i>";
}
if(Action==6) AddTxt="rn

";
if(Action==7) AddTxt="
rn";
if(Action==8) AddTxt="<hr>rn";
if(Action==9) {
txt=prompt("URL for the link.","http://");
if(txt!=null){
AddTxt="<a href="+txt+">";
txt=prompt("Text to be show for the link","Text");
AddTxt+=txt+"</a>rn";
}
}
if(Action==10) {
txt=prompt("URL for graphic","URL");
if(txt!=null)
AddTxt="<img src="+txt+">rn";
}
if(Action==11) {
txt=prompt("Text to be made Underline.","Text");
if(txt!=null)
AddTxt="<u>"+txt+"</u>";
}

form.sent1.value+=AddTxt;

}

// End -->
</SCRIPT>
Code
	<table border='1' width='50%' align='left' cellspacing='1' cellpadding='3'>
<tr>
<td width='100' align='left'><b>$CONFIGURESENTENCE1</b></td>
<td width='240' colspan='2'>
<input type='button' value='Link' onClick='AddText(this.form,9);'>
<input type='button' value='Bold' onClick='AddText(this.form,4);'>
<input type='button' value='Italic' onClick='AddText(this.form,5);'>
<input type='button' value='Underline' onClick='AddText(this.form,11);'>
</td>
</tr>
<tr>
<td width='100' align='left'>$Sentence:</td>
<td width='160'>
<textarea name='sent1' rows='7' cols='33'>$sent1</textarea>
</td>
<td width='225'>$expsentence</td>
</tr>
<tr>
<td width='100' align='left'><b>$CONFIGURESENTENCE2</b></td>
<td width='240' colspan='2'>
<input type='button' value='Link' onClick='AddText(this.form,9);'>
<input type='button' value='Bold' onClick='AddText(this.form,4);'>
<input type='button' value='Italic' onClick='AddText(this.form,5);'>
<input type='button' value='Underline' onClick='AddText(this.form,11);'>
</td>
</tr>
[Linked Image]
© UBB.Developers