Soldato
- Joined
- 2 Jun 2004
- Posts
- 18,423
i'm trying to add a javascript random quotes block to my site. it's working fine with the following code...
the problem is that it stops working when i change the second quote to the following...
how can i fix it so that it works with that quote?
Code:
var quotes = new Array;
quotes.push("Thank you!");
quotes.push(""Here is another quote."<br><br>John Doe<br>ACME Inc.");
quotes.push("Keep adding quotes like this.");
document.write(quotes[(Math.floor(Math.random() * quotes.length))]);
the problem is that it stops working when i change the second quote to the following...
Code:
quotes.push("""blah blah blah blah blah blah blah blah blah blah...blah blah blah blah...blah blah...blah blah blah...?""<br><br>John Doe<br>ACME Inc.");