D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] OT: Could anyone help with a bit of Javascript please?

 

Hi folks,

I'm currently in the process of putting together a simple(ish) web page 
to display a couple of frames and have an updating ticker box on there 
which reads the contents to display from a text file on the server.

Now I've been playing around with this which does pretty much what I want...

http://www.dynamicdrive.com/dynamicindex2/ajaxticker.htm

When the page loads and the script runs, it loads the contents of the 
text file into the memory and then goes through each item one after the 
other.  However, what I want is something that will automatically update 
itself, so if for instance anything gets added to the text file that it 
picks it up when it cycles through again.

At the moment to get it to do this, I've put some javascript in the main 
page with the ticker on that just refreshes the page every 60 seconds 
(refresh as if the user had pressed the F5 key).  This however causes a 
very quick flash on the screen when the page reloads which is a slight 
bit annoying.

I wondered if anyone would be able to suggest (if it's possible) what 
I'd need to add to the javascript to make it automatically reload the 
text file once it has cycled through each item in the text file but 
without reloading the whole page (I just want the javascript to reload 
the text file into it's array).

I'm pretty clueless when it comes to javascript.  I can understand 
little bits of it but my knowledge isn't enough to add this feature, so 
if anyone can suggest any ways of doing this then it would be great.

Ta,

Rob

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html