A while ago I was searching for a random quote javascript tool and found one. Not sure who the author is to be honest. However, I set it up on
www.talkjesus.com and the random quotes all work fine, except once in every handful of random quotes I get only a 'undefined'. I'm guessing there is a certain character in one of the lines that is not js friendly. I would not know since I'm not a coder, so I'm asking for your help please.
This is the code
Code:
var Quotation=new Array() // do not change this!
Quotation[1] = "Use the Preview Post button when posting a new thread or replying";
Quotation[2] = "Familiarize yourself with the site navigation menus on top";
Quotation[3] = "Try the Spy feature. Its shows you what threads members are viewing in real-time.";
Quotation[4] = "Pray first before giving counseling to others";
Quotation[5] = "Read Scripture daily. It is spiritual food.";
Quotation[6] = "Use our online Bible Glossary tool found under the Bible menu on top.";
Quotation[7] = "Break down your responses in easy to read, small paragraphs. Large paragraphs are a turn off to the audience.";
Quotation[8] = "The Bible is a book that is not for mere reading. It is a book for studying so that it can be applied.";
Quotation[9] = "We have a complete online bible. Click on Bible menu up top.";
Quotation[10] = "To love one's enemy does not mean to love the mire in which the pearl lies but to love the pearl that lies in the mire.";
Quotation[11] = "Invite your family, friends and church to our forums.";
Quotation[12] = "Proper paragraphing makes for better audience reading and responses.";
Quotation[13] = "When you feel down and going through tought trials, remember the countless great things Jesus has done for you!";
Quotation[14] = "Check out the entire Bible online in 17 translations and many additional resouces. Bible link on top menu.";
Quotation[15] = "Listen to music while browsing the site. Click on Radio & TV link under Entertainment menu. Opens a small pop-up window with various Christian worship stations of all sorts of genre.";
Quotation[16] = "You can invite everyone on your social mail or community contact list in one click! Click the Invite Friends link under the User CP menu on top.";
Quotation[17] = "Use the Save Draft button to save your post for later, without immediately publishing it.";
var Q = Quotation.length;
var whichQuotation=Math.round(Math.random()*(Q-1));
function showQuotation(){document.write(Quotation[whichQuotation]);}
showQuotation();
Example:
http://www.talkjesus.com/evidence-bi...rophecies.html
(pink box up top)
Thanks for your help.