468,545 Members | 1,705 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,545 developers. It's quick & easy.

Storing Greek Words in an Array?

3
Hi, I am new to learning how to program in JavaScript and want to design a program in JavaScript that will allow a user to run a Classical Greek vocabulary flashcard program on my web page. My question is how do I store Greek words in an array? I am using Yahoo GeoCities free web hosting so designing my web site is limited as to what tools I can use. I also don't want to use .gif files of my Greek words if that is possible. Is there a simple format to accomplish this? If I am wrong in my thinking, what do you recommend to be the simplist way to put Greek words in a JavaScript program so that a user can access them in the flashcard program? I use windows xp and notepad for a web editor. There are times I feel overwhelmed by the complexity of some vocabulary flashcard websites. One in particular uses php, javascript and mysql. I get lost trying to understand how it works. Thanks for taking the time to read and hopefully answer my dilemma.

pros
Nov 16 '06 #1
6 1695
AricC
1,892 Expert 1GB
So are you looking for something that you can put vocab words in an array and it randomly spits them back when you pust a button or something?
Nov 16 '06 #2
pros
3
So are you looking for something that you can put vocab words in an array and it randomly spits them back when you pust a button or something?
Yes, that is exactly what I want to do. Putting Greek words in an array so I can place them on a flashcard window with a button that I click to return a definition in English. Do I have to put special font tags in or use something else to accomplish this? I have no idea. Thanks again for responding Aric.
Nov 16 '06 #3
AricC
1,892 Expert 1GB
[html]<html>
<head>

<title>Test</title>
<script type="text/javascript">
function DisplayRandomGreekWord()
{
var GreekWord = new Array()
GreekWord[0] = "Some word"
GreekWord[1] = "Some other word"
GreekWord[2] = "Some other different word"

var RandomNumber = Math.floor(Math.random()*3)

if (RandomNumber == 0)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}

if (RandomNumber == 1)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}

if (RandomNumber == 2)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}
document.write('<br /><br />')
document.write('<a href="javascript:history.go(-1)">Go back</a>')

}

</script>



</head>

<body>

<form>


<input type="button" size="25" value="Click Me!" onclick="DisplayRandomGreekWord();" />


</form>

</body>[/html]

HTH,
Aric
Nov 17 '06 #4
pros
3
[html]<html>
<head>

<title>Test</title>
<script type="text/javascript">
function DisplayRandomGreekWord()
{
var GreekWord = new Array()
GreekWord[0] = "Some word"
GreekWord[1] = "Some other word"
GreekWord[2] = "Some other different word"

var RandomNumber = Math.floor(Math.random()*3)

if (RandomNumber == 0)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}

if (RandomNumber == 1)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}

if (RandomNumber == 2)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}
document.write('<br /><br />')
document.write('<a href="javascript:history.go(-1)">Go back</a>')

}

</script>



</head>

<body>

<form>


<input type="button" size="25" value="Click Me!" onclick="DisplayRandomGreekWord();" />


</form>

</body>[/html]

HTH,
Aric


Aric,

Thanks for the code. My question is how do you set up the array so that the browser will show "Some word" in Greek letters with the accents? I know english words will show in the browser but is there some kind of format to change to another language? Thanks again Aric for taking the time to answer my question.

pros
Nov 18 '06 #5
AricC
1,892 Expert 1GB
I'm not familiar with the Greek alphabet but I assume you would use something like this. Use the code next to the letter you want ie.. &Delta; for the Greek letter Delta.

HTH,
Aric
Nov 18 '06 #6
vssp
268 100+
Thanks AricC

Good solution I am also search the same issue thansk
Nov 18 '06 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by sharma | last post: by
2 posts views Thread by Kyle | last post: by
4 posts views Thread by Kiki | last post: by
1 post views Thread by interuser | last post: by
6 posts views Thread by Kyle Teague | last post: by
10 posts views Thread by deciacco | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.