Click to See Complete Forum and Search --> : help editing javascript


esthera
11-20-2003, 04:12 AM
I need help editing the following script

var newslist=new Array();
var cnt=0; // current news item
var curr = "";
var i=-1; // current letter being typed

newslist[0]=new Array(' Moreshet Institute Mid-Winter Kiruv Training

Seminar in Israel, Jan. 18 - 25. Register now.','news.asp?id=16')


function newsticker()
{

// next character of current item
if (i < newslist[cnt][0].length - 1)
{
i++;
temp1 = newslist[cnt][0];
temp1 = temp1.split('');
curr = curr+temp1[i];
temp2 = newslist[cnt][1];
mtxt.innerHTML = "<font class=hptextwhite>"+curr+"_</font><a

href='"+temp2+"' class=hptextwhite>More..</a>";
setTimeout('newsticker()',10)
return;
}
// new item
i = -1; curr = "";
if (cnt<newslist.length-1)
cnt++;
else
cnt=0;
setTimeout('newsticker()',3000)
}


Currently the way this works (you can see live at

www.nevey.org/defaultx.asp)

is the more... is underline and trailing. I want it to work that the

letters trail on and then the more comes on at the end(underlined).
Also can I set if their is no url (that part of the array is blank)

then the more does not come on.