OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

random testimonials

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> random testimonials
Page: [1]
 
barking mad

 

Posts: 287
Joined: 12/6/2002
From: Out in the sticks, UK
Status: offline

 
random testimonials - 8/10/2009 7:02:52   
I've taken over a site and need to stick to the same page names for now with .htm extensions.

Is it possible to include a random testimonial (from a set of 12) on each page? I know how to call in a subroutine or file includes in >ASp but not .htm

Any help would be appreciated, Thanks.

_____________________________

The more I ask, the more I learn, the more I' m confused, therefore the more I ask ...
Tailslide

 

Posts: 6692
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: random testimonials - 8/10/2009 7:07:04   
Can't help you with the ASP but I use PHP to do this and it might be quite similar.

I have a .txt or .php file with all the testimonials in it - one on each line surrounded by the appropriate HTML markup (e.g. paragraphs, blockquote, cite etc).

In the html page I have:
           <?
           $fc = join("",file("/scripts/testimonials.php"));
           $fc = "$fc\n"; $spl = split("\n",$fc);
           srand((double)microtime()*1000000);
           $rndnum = (rand()%(count($spl)-1));
           echo $spl[$rndnum];
           ?>

Which basically randomly chooses a line in the php or .txt file and displays it on the html page. To do this on an .html page though I have to change the available addhandler extentions in the Cpanl so that it's basically reading a .php page as a .html. Maybe it'd be something similar for ASP?

_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to barking mad)
ou812

 

Posts: 1705
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: random testimonials - 8/10/2009 13:42:41   
There are different javascripts around, like on dyanmicdrive that may do the trick for you. Something like: http://www.dynamicdrive.com/dynamicindex17/ajaxrotate.htm ?

_____________________________

-brian

Black Holes suck.

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to barking mad)
Page:   [1]

All Forums >> Web Development >> General Web Development >> random testimonials
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts