473,385 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1883
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

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

Similar topics

3
by: sharma | last post by:
Hi, I have a application which shows the content in two different languages English and Russian. It has Languge folder where in it maintains seperate language folders named English and Russian....
2
by: Kyle | last post by:
Got a tough one here for you SQL junkies. I'm working on a website (in ASP) for a national greek/college organization. All it's college chapters have greek chapter names, i.e. Alpha Chapter,...
7
by: Arnold | last post by:
I need to read a binary file and store it into a buffer in memory (system has large amount of RAM, 2GB+) then pass it to a function. The function accepts input as 32 bit unsigned longs (DWORD). I...
4
by: Kiki | last post by:
Hello, I'm trying to find a way to display text in greek or cyrillic in a .NET page using text stored in XML format. I'm getting the greek words displayed like this: "Διάφορα". I'm no expert but...
1
by: interuser | last post by:
Hi I have a web app that has a webpage on which there is a textbox and a submit button. if I type greek and press submit, the greek does not go through to the webserver. If I type greek and...
6
by: Kyle Teague | last post by:
What would give better performance, serializing a multidimensional array and storing it in a single entry in a table or storing each element of the array in a separate table and associating the...
1
by: hello12 | last post by:
hello, i am having trouble storing word from a text file into a 2d array in C. the array size is 20 by 20 and i am required to store one word in each row. For some reason i don't get how to use a...
0
by: nass | last post by:
hello everyone and happy new year. i am not sure how to tackle this problem or where is originates from so i am writing here in hope that if you can not help you can at least point me in a...
10
by: deciacco | last post by:
I'm writing a command line utility to move some files. I'm dealing with thousands of files and I was wondering if anyone had any suggestions. This is what I have currently: $arrayVirtualFile =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.