noob question-Automatic article rotation

Ricardoco

New Member
Hi there all, yes im new to this forum, and yes i expect this question has been asked and answered before, but as much as i try i cant find it anywhere. So if it has been asked and answered then please link me..

I have a section on a web page that i intend to contain little snippets of information, i have 24 snippets, and i would like the snippets to rotate either on a regular basis ie a new snippet each 2 weeks or even a snippet that changes when you refresh the page. can anyone help me to achieve this or at least point me in the right direction...if you have any questions about this then just ask away....:D
 

DLPerry

New Member
Ricardoco said:
Hi there all, yes im new to this forum, and yes i expect this question has been asked and answered before, but as much as i try i cant find it anywhere. So if it has been asked and answered then please link me..

I have a section on a web page that i intend to contain little snippets of information, i have 24 snippets, and i would like the snippets to rotate either on a regular basis ie a new snippet each 2 weeks or even a snippet that changes when you refresh the page. can anyone help me to achieve this or at least point me in the right direction...if you have any questions about this then just ask away....:D

My favorite prowling programmer has a tool that generates the code to rotate content on a website based on criteria you set. It's free, and it's done online. Here's more info from the site:

"JavaScript Random and Duplicate Content Generator.

Use JavaScript to insert pseudo-randomly selected content into your web pages — ads, images, syndicated copy, pretty much any HTML and JavaScript that can be used on a regular web page.

Different content can be selected each time the web page is viewed.

Alternatively, the same content can be presented to the same person, every time a page is viewed.

As a further alternative, the same content can be presented consecutively for a specific number of page views, then different content selected.

Lots of info about this generator is at the "Random and Duplicate Content With JavaScript" article."​

hth

--dlp
 

Ricardoco

New Member
It looks simple enough but where does it generate the code, i cant seem to get the generated code, i know it is me doing something wrong because i just cant work it out.........:confused:
 
Last edited:

DLPerry

New Member
UPDATE:

I got it to work after closing all browsers and coming in at it again...must've been a rouge cookie, or cached, or something.
Try doing that, and then go back in here --> http://bontragercgi.com/JavaScript_Random_and_Duplicate_Content_Generator.html

--dlp

Well phooey -- it looks like the page is broke :(
I'll let Will know - hopefully he can fix it soon..

There is another script that I use on my site which is similar, (reload the home page, or any page and you'll see the ads on the right change) but it is non-transferrable, and available only to VCC members, and to be VCC member you must have purchased and used at least one of the other commercial software or program titles. :(
I'll not post the link here - don't want to be accused of inappropriate advertising - but in case your interested - the applicable software titles are on my site - under "Site Enhancements" and "Professional CGI"

--dlp
 
Last edited:

Ricardoco

New Member
Ok after taking the code in this usefull tool to pieces i have found that you cannot use any html containing words like "don't" "can't" so the inverted comma would seem to cause the script to malfunction, when they are removed then it works fine, im not sure if this is a bug or not.
 

DLPerry

New Member
Have you tried using the HTML entitiy for ' instead?
Or adding the slash before the ' to 'cancel' the punctuation mark to the script?

I'll mention it to Will anyway, but I know he's really busy right now so he may not get around to it for a while.
 
Top