News Ticker Question

I downloaded the ticker software. Works great and all. But wanting it to ‘refresh/reload’, the form, so to reload the view, to get the updated information.

I tried putting in the reload command all through the javascript. I might have used the wrong javascript commands, etc. Can you please give me a hand and show me where and how I should put the refresh for this news ticker?

I tried

document.reload(True) ;

window.reload(True);

Any help would be appreciated on how I could get this window to refresh after getting to the last document.

I am pasting the original code below:

var max=0;

function textlist()

{

this.max=textlist.arguments.length;

for (i=0; i<this.max; i++)

this[i]=textlist.arguments[i];

}

var x = 0;

pos = 0;

function textticker()

{

l = tl.length;

document.forms[0].tickfield.value = tl.substring(0, pos) + “_”;

// document.all.tickspan.innerText = tl.substring(0, pos) + “_”;

if(pos++ == l)

{

pos = 0; 

if(++x == tl.max) 

{

  x = 0; 

  setTimeout("textticker()", 3500); 

//I tried here, but might have had code wrong.

}

else

  setTimeout("textticker()", 1750); 

l = tl[x].length;

}

else

setTimeout("textticker()", 45);

}

Subject: News Ticker Question

I’ve found the js “location” feature to be most valuable for refreshing. Give it a try

Collin

KC8TKA

Subject: RE: News Ticker Question

But where would I put it? I put in location.reload(True), where the ‘timer’ is the longest. That is where it knows its on the last item. So I put it there, with no so such luck.

Any other ideas?

Subject: RE: News Ticker Question

Hi,

I ran into this issue recently. Here is what I did:

  1. Wrote an Agent that writes the latest news into a profile field

  2. Created the Ticker Form with a computed field on it.

Formula is something like: @GetProfileField(“form”;“field”)

  1. Created a button (hidden) on the form with some LotusScript on it:

set a = db.GetAgent(“Refresh”) 'Refresh the value in profile doc

a.Run

uidoc.Refresh() 'Recompute Computed Field

  1. Created a JS Timer (using a function called by setTimeout()) which presses the button:

document.forms[0].btnRefresh.click();

With this solution, the refresh is done nicely. You don’t even notice when it happens…

cheers

christian