View Full Version : quotes generator
FyshY25
10-22-2008, 12:59 AM
Okay i am building a web page for a group in school. One of the elements I want to add is a quote. I have a huge list of quotes and need a way to display one without a huge list in the source code. I an not great with java but i was wanting to know if i could have a *.class or *.js file that had the quotes and a java script pick a random one and display in the html ? Please help
magicyte
10-22-2008, 02:27 AM
Easy. Put the quotes in a string in a seperate .js file. (you know, an array) After this, use excerpts of this code to choose the quote randomly. Here is the thread: Display Random... (http://www.dynamicdrive.com/forums/showthread.php?t=33714)
-magicyte
FyshY25
10-22-2008, 10:20 PM
im a newbi... how can i put the array ? and how would i linke the *.js in the code?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.