|
Jordan -> Rotating Quote Javascript and Accents in Spanish Words (6/16/2008 10:20:48)
|
I've been working on preparing a Spanish version of my employers company Web site. I don't speak Spanish, so it has been translated for me. I've changed the encoding so the site will show the accents that appear in many Spanish words. The one problem that I have not been able to figure out is a javascript that I'm using to randomly rotate quotes throughout the site. I get that odd little "?" symbol where a letter with an accent should appear. I've tried inserting "\" before the letter as you do for apostrophes and quotation marks, but that didn't do the trick. Here's an example of the script... This in the head of my document... quote:
<script language="JavaScript1.1" src="includes/quotes.js"> This in the quotes.js file.... quote:
var quotes=new Array() quotes[0]='La mezcla única dulce cítrica de las variedades de Arándanos Silvestres entrega un torrente de sabor delicioso de la Madre Naturaleza que no se puede encontrar en ningún otro lugar. Esto significa que sus productos de Arándanos Silvestres tendrán más del gran sabor que sus clientes desean. ' var whichquote=Math.floor(Math.random()*(quotes.length)) document.write(quotes[whichquote]) Surely javascript is used in Spanish Web sites. What am I missing? Thanks!
|
|
|
|