JavaScript running on a client PC cannot open external files for security purposes.
The best thing to use would be Perl or PHP...but if you need to use Javascript you can do this:
1. Create a file called
quotes.js and enter the quotes like this:
Code:
var quote = new Array(20)
quote[0] = "Buy a Pentium 586/90 so you can reboot faster."
quote[1] = "2 + 2 = 5 for extremely large values of 2."
2. Put this code in your HTML file:
Code:
<script src="quotes.js"></script>
<script>
document.write(quote(Math.round(Math.random()*(quote.length-1))+1));
</script>
Well...that's the general idea...I'm sure you get the picture...anything more complicated than this and I'd recommend using PHP or Perl.
Lewis