Forums Archive Index > Cool free scripts > Very Nice, Got a question
Date: 22 Jun 2005 8:34 pm
First, I'd like to say that the news script is an awsome peice of coding work. Very small, extremely easy to use compared to other similar scripts, very cross-browser, and a nice light load. Love it.
One question about the script. I'm no wiz with javascript, but is there a way to have the script pull from a text file on the site, rather than from hard-coded news items?
Date: 24 Jun 2005 3:40 am
It can be done with server-side scripting (e.g. PHP, ASP..).
However, if you keep the script in a separate .js file (let's say v_newsticker.js) it's almost the same as keeping yout items in a separate text file. Instead of the a text file, you would edit the .js file.
Date: 24 Jun 2005 3:24 pm
Yeah, I got that figured out. I put a link for the js file containing just the news variable, in the header of the page, and then put the link to the news-ticker js file in the body where I wanted it, minus the news variable, and it ran fine.
I guess I need to do some poking around with the second file. I have users who are not code savvy, and I'd like for them to be able to basically just write lines in a text file, save it, and be done. No worries. This is a lump on my end.