Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Factoid of the Day mechanism

Posted on 2002-07-13
13
Medium Priority
?
204 Views
Last Modified: 2013-12-25
I have a list of about 40 Facts of the Day, each consisting of two or three sentences.  I would like to be able to have one of these appear in a designated location on a home page, selected either per the order of listing, or randomly. So a visitor would get a different Factoid either each day, each time he logs on, or each reload, whatever works. Ideally, the process would allow me to determine which frequency of appearance.

I am using Dreamweaver MX. The server allows SSI. I can also insert javascript on the page, alghough suspect that the rather long list of factoids might cause long download. I've seen various PHP and javascripts, but none seem to do exactly what I want. I can make entries on scripts in the html, but am not skilled in technical aspects of scripting or coding, so solution should provide clear implementation instructions.

Workable solution would be appreciated. Thanks.
0
Comment
Question by:jajr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 4
13 Comments
 
LVL 18

Expert Comment

by:bruno
ID: 7152870
I do something similar on a page, using ASP and MS Access...are those an option?

I have all my tips stored in the DB, pulled onto the page randomly...


BRUNO
0
 

Author Comment

by:jajr
ID: 7152879
Sorry, these would be beyond what I have access or ability to handle.
0
 
LVL 12

Expert Comment

by:Wouter Boevink
ID: 7154114
What can you access and what's the ability you can handle?

Is php an option, I saw you mentioned it?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jajr
ID: 7154192
Javascript or SSI seem to be the options, as mentioned in initial query.  Don't have or understand PHP. Server is UNIX running apache. Also allows CGI.

I have seen one or two javascripts that I could probably handle, but they would require the server to DL all 40 entries, even though only one would be seen, if I understand how this works.  The list of 40 seems to take up around 5K, which may not be too heavy a time burden. As you can see, I'm groping into an area I don't have strong expertise in.

 Thanks.
0
 
LVL 12

Expert Comment

by:Wouter Boevink
ID: 7154452
You're right javascript is the only option for you.
SSI (Server Side Include) doesn't do anything but include the file.

Would you like a javascipt?
0
 
LVL 18

Expert Comment

by:bruno
ID: 7154546
wboevink,

they also said CGI would be an option.... I don't know much about CGI or Perl but that could prevent the entire list from being downloaded, no?


BRUNO
0
 
LVL 12

Expert Comment

by:Wouter Boevink
ID: 7154866
CGI, PERL, ASP, PHP, JSP you name it. They are all serverside solution, and they all can prevent the entire list from being downloaded. So tell me which solution can you use, and which one do you want to use.

It depends on your webserver which serverside language it supports.
0
 

Author Comment

by:jajr
ID: 7155002
Hey, I really appreciate your trying to narrow this down for me.  The server I use allows CGI, and has PERL installed.  I have a CGI-bin on the site that already houses a site search engine and an e-postcard feature. I did not configure them, but can make the occasional entry into the scripts within a designated area if it's a plain English thing.

(It's www.rrmuseumpa.org if you're into railroad history! The factoids are to go on a new version with prototype at www.rrmuseumpa.org/test . Each factoid is two or three sentences long.)

-- Jim
0
 
LVL 18

Expert Comment

by:bruno
ID: 7155036
I don't know CGI, but i'm sure you can use that rather than javascript....hopefully wboevink can help
0
 
LVL 12

Accepted Solution

by:
Wouter Boevink earned 800 total points
ID: 7155051
I think this one suites you just fine:

Random Text is a program which takes a plain text file, which contains a series of phrases, quotes, lines of text, html tags, etc... and a delimiter (the character(s) which separate each entry) and will randomly choose one of the phrases and display it on your web page. This scripts does require the use of Server Side Includes. There are several downloading options available below and more information on this script can be found in the Readme file.

http://www.scriptarchive.com/rand_text.html

If you need another one or need help implementing it, just let me know. I'm of to the pub, be back in about 2 hours.

cd /pub
more beer
0
 

Author Comment

by:jajr
ID: 7155970
Took a look at it , and it seems promising.  Will play with it next day or so and give a holler if I need help.

Just spent a full day with a technician fixing some Windows 2K problems, and am ready for a pub too!

Thanks.
0
 

Author Comment

by:jajr
ID: 7161178
Got it working at:
http://www.rrmuseumpa.org/test/factoidtest.shtml
and will shift it to the new home page once that all comes together. Appreciate it very much. Thank you!

-- Jim
0
 
LVL 18

Expert Comment

by:bruno
ID: 7161182
looks great!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question