ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Place randomly selected quotes in a specific box on a web page

(1/2) > >>

Clive:
I've made a very simple web site for our business - an electronic brochure really. I used Nvu, as I have no coding experience, and based the pages on a CSS template provided by A. Viklund.
Over time we've had some nice thankyou messages from our customers and I incorporated a couple into the site. The other day I thought it would be neat if the quotes changed everytime the home/index page was loaded/refreshed. I did a bit of searching and sure enough plenty of other people had thought of this before me and written some code. The problem with all the code I found was that there was no way to locate its action on the page just where I wanted it.
On my site's home/index page I have a three column single row table with a thumbnail in A1 & C1 and I want the quote to appear in B1.
Is this request worthy of someone's time? If not some gentle nudges in the right direction would be gratefully received.

Thanks,
Clive

mouser:
I wrote php code to do this - and there are other scripts as well for it.
As I am going to be revamping this code in the next couple of weeks to include random screenshots and other stuff, let me revisit this issue in february and share what i've written.  in the meantime please post what you find on your own and remind me again in february.

chedabob:
I could do it, but Id probably need to see the code for the page you want it on.

Clive:
Here's part of the page including the quotes and the table format - hope that's what you need.

<table style="text-align: left; width: 718px; height: 167px;" border="0" cellpadding="0" cellspacing="0"> <tbody><tr><td style="text-align: left; vertical-align: middle; width: 184px;"><a href="SD_1.html"><img title="Click to go to SD 1 page" style="border: 0px solid ; width: 180px; height: 118px;" alt="Singapore Deep 1 One Bedroom FSC Accommodation near Wilsons Promontory" src="SDOne011b.jpg"></a></td> <td style="width: 315px; text-align: center; vertical-align: middle;">&nbsp;<big><span style="font-style: italic;"></span></big>
<script><SCRIPT LANGUAGE= "JAVASCRIPT"><!--var r_text = new Array () ;
r_text[0] = "My husband and I had a wonderful stay at Singapore Deep. It was just wonderful to go and recharge the batteries. We loved the view of the bay. Laura";
r_text[1] = "Wonderful couple of days,
you should be very proud of your setting and service. Many Thanks, Peter";
r_text[2] = "We had a really lovely 1st anniversary staying at Singapore Deep. We loved the wide sliding doors over looking the water. Sarah";
r_text[3] = "Margaret - thanks again for a wonderful 4 days at your retreat, it was great to meet you. Simon";
r_text[4] = "What an unusual and pleasant two days Paula and I enjoyed this week at Singapore Deep. We were very impressed indeed, not only with the architecture and view but with the cleanliness and high standard of fittings, equipment etc. Ian";
r_text[5] = "Just wanted to say thank you for providing such beautiful accommodation in SD1. We have just had a lovely weekend there enjoying the stunning view and feeling completely relaxed.
You provide just the right combination of privacy and luxury to make the whole experience a joy. Leanne";
r_text[6] = "I would like to let you know that my husband and I had wonderful day at Singapore Deep. We loved the seclusion and the gentle view of the bay. Laura";
var i = Math.round(6*Math.random());document.write(r_text);//--></script></td><td style="vertical-align: middle; white-space: nowrap; width: 175px; text-align: right;"><a target="_blank" href="SD_2.html"><img style="border: 0px solid ; width: 184px; height: 122px;" title="Click to go to SD 2 page." src="SDTwoLHview52WA07a.jpg" alt="Singapore Deep Two - 2 bedroom FSC accommodation" hspace="120"></a></td>

The array, etc is based on an example I found on the web. It doesn't have any code to link it to the blank space in the table.

Clive:
The problem has been resolved with the help of Ask The CSS Guy. See Ham Radio's post here:https://www.donationcoder.com/forum/index.php?topic=7188.msg50527#msg50527
Thanks Mouser & Chedabob for your offers of assistance.

Clive

Navigation

[0] Message Index

[#] Next page

Go to full version