Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Randomizing testimonials

Featured Replies

I have this site that I am working on: http://www.pigeondesigner.co.uk/_clientwork/elite-offset/

 

What I want to be able to do is to randomize the testimonials box on the left hand side with every refresh - what is the most simple way of doing this? Ideally I don't want to use a database...

 

Ideas on a postcard :p

 

Cheers in advance

Using XML in this tutorial: XML Random Quotes

 

Or there are ways to do it with "flat files", the comments saved to a txt file and have your PHP pull a random one.

  • Author

Good answer John - Will take a look at that tonight when I get home from the real job lol

 

I will update you on how it goes for me :)

hehe thanks, look forward to hearing how it goes. XML is somthing i am looking to use more :)

  • Author

Ah bugger - the client has his own hosting..... no php server!! lol

 

So it has to be a non-php way of randomizing.... jquery/jscript?? :)

  • Author

No problems - I have found a nice simple way of doing it via Javascript - got to work on the css side of things, but it looks promising :)

 

Cheers anyhow :p

I guess you could create a js randomiser tied to a js array, store all the testimonials in the javascript array and have the randomiser script return the random array string.

 

Im googling it atm but havnt found anything decent just yet.

 

Edit, cool. glad you found a way :) I would be intrested in seeing how if you dont mind sharing

  • Author

Yeah no worries - I have uploaded it to the site - feel free to browse the source code :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.