code question

M

MyLife

I am trying to make a little program similiar to the use of flash
cards on a website. What it should do is have the user choose which
language it wants to practice on, which is why I have the scrollbar
displaying the languages. When the user clicks the button, it should
translate the word. I have only done Arabic and English in my array
now as I would like to get at least some of it working before I do it
all wrong and have to redo everything:) (I'd rather find out now than
later:)

I have my code now, but I'm stuck as to how to proceed.
1.) How can that array be shuffled as to not show the words in the
same order over and over again?
2.) Is there a simpler way to do it rather than write the array in
seperate languages? For example, if I have one function declared and
one single button, can I just write one "translate" function that will
be able to translte the word depending on which choice the user has
selected in the box?

Here's my code right now, and if possible, can you please email to my
address as I do not often log into google groups. Thank you

<html>
<head>
<title>Arabic Flash cards</title>

<Script Language="Java Script">
<!--
function show_arabic() {

var Arabic=new Array(2)
Arabic[0]="Mahatit Al Metro";
Arabic[1]="matar";
Arabic[2]="Apreel";
var x=0;
(for x=0; x<2; x++)
}
//----->
</Script>

<Script Language="Java Script">
<!---
function show_english() {
var english=new Array(2)
english[0]="metro station";
english[1]="airport";
english[2]="April";
var y=o;
(for y=o; y<2; y++)
}
//-->
</Script>
</head>


<body bgcolor="black" text="green">



<form>

<textarea cols=25 rows=6>
</textarea>

<select multiple size=4>
<option>Arabic;
<option>Dutch;
<option>Farsi;
<option>French;
<option>German;
<option>Hungarian;
<option>Polish;
<option>Russian;
<option>Spanish;
<option>Swedish;
</select>

<INPUT type="button" value="Translate word">

</form>

</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,573
Members
47,205
Latest member
ElwoodDurh

Latest Threads

Top