/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Help with random quote script

Hi everyone!

I need help with a so-called random quote script which i found on a webpage, but i can’t get it to work properly. I worked when i only had 9 quotes, which was the default for the script, but when i added more quotes, they simply stopped showing up. Here’s my script, i hope someone can help me:

<FONT COLOR=”YELLOW”>
<script language=”JavaScript”>
// ==============================================
// Copyright 2004 by CodeLifter.com
// Free for all; but please leave in this header.
// ==============================================

var Quotation=new Array() // do not change this!

// Set up the quotations to be shown, below.
// To add more quotations, continue with the
// pattern, adding to the array. Remember
// to increment the Quotation[x] index!

Quotation[0] = “He will win who knows when to fight and when not to fight. – Sun Tzu” ;
Quotation[1] = “All warfare is based on deception. – Sun Tzu”;
Quotation[2] = “Selv om det er dumt å forhaste seg i en kamp, blir seier sjeldent asossiert med lange forsinkelser – Sun Tzu”;
Quotation[3] = “If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle. – Ordtak”;
Quotation[4] = “En liten mann tror at små gode gjerninger ikke har noen verdi, og unnlater dem – og at små onde gjerninger ikke gjør noen skade, og unnlater ikke dem – Konfucius”;
Quotation[5] = “Bær hver dag en kurv grus til samme sted, og du skal bygge et fjell. – Konfucius”;
Quotation[6] = “Hvor du enn går, så ta med deg hele ditt hjerte. – Konfucius”;
Quotation[7] = “En måte å redde ansiktet på er å holde den nederste delen lukket. – Kinesisk ordtak”;
Quotation[8] = “Den som først griper til vold, viser at han ikke har flere argumenter. – Kinesisk ordtak”;
Quotation[9] = “Kloke bier unngår visse blomster. – Kinesisk ordtak”;
Quotation[10] = “Hugg velgjerninger i marmor – skriv fornærmelser i sand – Kinesisk ordtak”;
Quotation[11] = “Ekte gull frykter ikke en ildprøve. – Kinesisk ordtak”;
Quotation[12] = “Hvis hunden går når katten kommer, blir det ingen kamp. – Kinesisk ordtak”;
Quotation[13] = “De som sløser bort dagen med å snakke om gårsdagens seire, får ingenting å skryte av i morgen – Kinesisk ordtak”;
Quotation[14] = “Du kan ikke hindre sorgens fugler i å fly over ditt hode, men du kan hindre dem i å bygge rede i ditt hår. – Kinesisk ordtak”;
Quotation[15] = “Hør på når faren din formaner deg, og glem ikke det din mor har lært deg – Bibelsk (Ordspråkene 1:8)”;
Quotation[16] = “De som går på krokete stier, går seg bort på sine veier” – Bibelsk (Ordspråkene 2:15);
Quotation[17] = “Gjør godt mot de som trenger det, og unnlat ikke å hjelpe når det står i din makt – Bibelsk (Ordspråkene 3:27)”;
Quotation[18] = “Bevar ditt hjerte fremfor alt du bevarer, for livet ditt går ut ifra det – Bibelsk (Ordspråkene 4:23)”;
Quotation[19] = “Gå til mauren, du late, se på hans strev og bli vis. – Bibelsk (Ordspråkene 6:6)”;
Quotation[20] = “Physical boards are easy to break, it’s the mental ones we struggle with. – Anonym”;
Quotation[21] = “Those who sweat the most during peacetime are those that will bleed the least in war. – Steven R. Barth”;
Quotation[22] = “There is no first strike in Karate. – Master Gichin Funakoshi” ;
Quotation[23] = “He who chases around after many rabbits ends hungry. – Ordtak fra Okinawa”;
Quotation[24] = “Those things in life that we find the hardest to do, are the things we are the most thankful we did. – Annette Ueckert “;
Quotation[25] = “The true measure of a man is how he treats someone who can do him absolutely no good. – Samuel Johnson “;
Quotation[26] = “Do, or do not. There is no ‘try’. – Yoda “;
Quotation[27] = “Don’t hit at all if it’s honorably possible to avoid hitting; but never hit soft. – Theodore Roosevelt”;
Quotation[28] = “Don’t hit to make him angry! Hit to make him sleep! – Master Constantin Zabbal”;
Quotation[29] = “To win one hundred victories in one hundred battles is not the highest skill. To subdue the enemy without fighting is the highest skill. – Sun Tzu”;
Quotation[30] = “Boards don’t hit back. – Bruce Lee”;
Quotation[31] = “It is good to have an end to journey toward; but, it is the journey that matters in the end. – Ursula K. LeGuin”;
Quotation[32] = “Pain is the best instructor, but no one wants to go to his class. – General Choi Hong Hi”;
Quotation[33] = “A black belt is nothing more than a belt that goes around your waist. Being a black belt is a state of mind and attitude. – Rick English”;
Quotation[34] = “The way of the sword and the Way of Zen are identical, for they have the same purpose; that of killing the ego. – Yamada Jirokichi”;
Quotation[35] = “If you don’t realize you can kill someone with a wooden sword, I don’t want you using one in *MY* dojo… – Frederick J. Lovret”;
Quotation[36] = “The fastest draw is when the sword never leaves the scabbard, the strongest way to block, is never to provoke a blow, and the cleanest cut is the one withheld. – Anonym”;
Quotation[37] = “My instructor once told me that the first five dan ranks come for what you’ve gotten out of the system, the next ranks come for what you’ve given back. – Anonym”;
Quotation[38] = “When two tigers fight, one is certain to be maimed, and one to die. – Master Funakoshi”;
Quotation[39] = “Of those who start TaeKwonDo training, only about 5% stick with it until they achieve the Black Belt Rank. Then perhaps 80% of those who earn a Black stop there. – Duk Sung Son”;
Quotation[40] = “‘Ow’ is not a Kempo word – Jonathan Vance”;
Quotation[41] = “Practice does not make perfect; but instead a good practitioner. – Nat Peat Sensei.”;
Quotation[42] = “There are no bad martial arts; there are only bad teachers. – Nat Peat Sensei” ;
Quotation[43] = “It’s not whether you get knocked down, it’s whether you get up. – Vince Lombardi”;
Quotation[44] = “If you can imagine it, you can achieve it: If you can dream it, you can become it. – William Arthur Ward”;
Quotation[45] = “A journey of a thousand miles must begin with a single step. – Lao-Tzu “;
Quotation[46] = “I hear and I forget. I see and I remember. I do and I understand. – Confucius”;
Quotation[47] = “The greatest power is often simple patience – E. Joseph Cossman”;
Quotation[48] = “Striving for success without hard work is like trying to harvest where you haven’t planted – David Bly”;
Quotation[49] = “The obstacle is the path – Zen-ordtak “;
Quotation[50] = “Never leave an enemy standing” – Shaka Zulu;
Quotation[51] = “Practice is profiting from experience in advance. – Peter Urban”;

// ======================================
// Do not change anything below this line
// ======================================
var Q = Quotation.length;
var whichQuotation=Math.round(Math.random()*(Q-1));
function showQuotation(){document.write(Quotation[whichQuotation]);}
showQuotation();
</script></FONT>

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 06.2006 — I don't see anything obviously wrong, but I've moved it to the JavaScript forum so that the experts there can take a look.
Copy linkTweet thisAlerts:
@felgallJul 06.2006 — Quote 16 has the quotes in the wrong place. The " on the end is missing and there is one in the middle that isn't escaped by preceding it with a

Quotation[16] = "De som går på krokete stier, går seg bort på sine veier[b][/b]" - Bibelsk (Ordspråkene 2:15)[b]"[/b];
Copy linkTweet thisAlerts:
@DraugauthorJul 06.2006 — Thanks a lot...but it still doesn't work though ?
Copy linkTweet thisAlerts:
@DraugauthorJul 06.2006 — Ok, found my mistakes. Thanks anyway?
×

Success!

Help @Draug spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...