Zufällige Zitate anzeigen lassen

unique23

Aktives Mitglied
Thread Starter
Dabei seit
03.03.2004
Beiträge
759
Reaktionspunkte
2
Hallo zusammen,

ich möchte gerne aus einer Reihe von Zitaten EINES zufällig auswählen und anzeigen lassen. Das ganze wollte ich per JS lösen, allerdings sind die Skripte die ich finde nur per Link stuerbar und ich weiß nicht wie man das umschreiben kann. So müsste es nach meinem Geschmack so sein, daß man onLoad von der Seite ein neues zufälliges zitat angezeigt bekommt.

Hier mal mein bisheriges Skript:
Code:
<script language="JavaScript">
<!--

var z= 50;
quotes = new Array(z);
quotes[0] = "Nothing is as easy as it looks."
quotes[1] = "I found out she's an angel.  I don't think she knows I know.  I'm worried that something might happen to me if anyone ever finds out."
quotes[2] = "Every jumbled pile of person has a thinking part that wonder's what the part that isn't thinking isn't thing of."
quotes[3] = "Love see's love's happiness.  But happiness can't see that love is sad."
quotes[4] = "Why the dancing, shouting, why the skrieks of pain?  The lovely music, why the smell of burning autumn leaves?"
quotes[5] = "Thank you for the card with the cartoon nurse, but there's nothing wrong with me."
quotes[6] = "You didn't enjoy it you never believed it there won't be a refund you'll never go back."
quotes[7] = "Lad looks at other gals.  Gal thinks Jim Bean is handsomer than lad, he isn't bad."
quotes[8] = "I don't want the world. I just want your half."
quotes[9] = "I could never sleep my way to the top, cause my alarm clock always wakes me right up."
quotes[10] = "Mother nature is a bitch."
quotes[11] = "It is impossible to make anything foolproof because fools are so ingenious."
quotes[12] = "Whenever you set out to do something, something else must be done first."
quotes[13] = "Every solution breeds new problems."
quotes[14] = "Trust everybody ... then cut the cards."
quotes[15] = "Two wrongs are only the beginning."
quotes[16] = "If at first you don't succeed, destroy all evidence that you tried."
quotes[17] = "To succeed in politics, it is often necessary to rise above your principles."
quotes[18] = "Exceptions prove the rule ... and wreck the budget."
quotes[19] = "Success always occurs in private, and failure in full view."
quotes[20] = "Buy a Pentium 586/90 so you can reboot faster."
quotes[21] = "2 + 2 = 5 for extremely large values of 2."
quotes[22] = "Anything that can go wrong will go wrong."
quotes[23] = "Computers make very fast, very accurate mistakes."
quotes[24] = "My software never has bugs. It just develops random features."
quotes[25] = "If anything simply cannot go wrong, it will anyway."
quotes[26] = "Best file compression around: \"DEL *.*\" = 100% compression"
quotes[27] = "The Definition of an Upgrade: Take old bugs out, put new ones in."
quotes[28] = "If everything seems to be going well, you have obviously overlooked something."
quotes[29] = "BREAKFAST.COM Halted...Cereal Port Not Responding"
quotes[30] = "BUFFERS=20 FILES=15 2nd down, 4th quarter, 5 yards to go!"
quotes[31] = "It is impossible to make anything foolproof because fools are so ingenious."
quotes[32] = "Bad command. Bad, bad command! Sit! Stay! Staaay..."
quotes[33] = "Every solution breeds new problems."
quotes[34] = "As a computer, I find your faith in technology amusing."
quotes[35] = "Two wrongs are only the beginning."
quotes[36] = "Shell to DOS... Come in DOS, do you copy? Shell to DOS..."
quotes[37] = "All computers wait at the same speed."
quotes[38] = "DEFINITION: Computer - A device designed to speed and automate errors."
quotes[39] = "Success always occurs in private, and failure in full view."
quotes[40] = "They say love is blind.  I don't think you're blind."
quotes[41] = "Everything takes longer than you think."
quotes[42] = "Anything that can go wrong will go wrong."
quotes[43] = "If there is a possibility of several things going wrong, the one that will cause the most damage will be the one to go wrong."
quotes[44] = "If there is a worse time for something to go wrong, it will happen then."
quotes[45] = "If anything simply cannot go wrong, it will anyway."
quotes[46] = "If you perceive that there are four possible ways in which a procedure can go wrong, and circumvent these, then a fifth way, unprepared for, will promptly develop."
quotes[47] = "Left to themselves, things tend to go from bad to worse."
quotes[48] = "If everything seems to be going well, you have obviously overlooked something."
quotes[49] = "Nature always sides with the hidden flaw."
//-->
</script>

<script language="JavaScript">
<!--
var jetzt=new Date();
var z=(jetzt.getSeconds())%50;
document.write("<font face='Arial,Helvetica,MS Sans Serif'>" + quotes[z] +"</font>");
//-->
</script>

Und ausgeführt wird das Skript wie folgt:
Code:
<p>
<a href="javascript:location.reload()">neuer Spruch</a>

Hat jemand eine Ahnug wie das zu lösen ist?
Vielen Dank!
 
Ähm...

Lade die Seite mal, anstatt den Link zu klicken, einfach mal neu :)

Denn genau das tut der Link

gruß
Lukas
 
ups,.. voll als loser geoutet :-D hehe danke und gleichzeitig sorry :-D
 
:D
Glaub mir, wenn ich manchmal die Lösung meiner Probleme sehe, wünsch ich mir einen Haufen Wände, gegen die ich laufen kann, so blöd komme ich mir dann vor :D

Und es gibt ja auch keine Blöden Fragen, nur blöde Antworten :)

gruß
Lukas
 
Zurück
Oben Unten