2. Regarding the scripts which I have suggested, no there is nothing to gain by using frames. You may have other considerations that would lead to frames, but nothing in the translation procedure would be easier in frames.
1.b and c. The errors lie in the .js files. That is where englishWords and elvishWords are defined. Those files must exist in the same folder as this page. They must have the statements . . . Oooops!
Today I think you need one dictionary file with both english and elvish words and definitions. Oh boy, that could be a costly mistake if you have typed in a lot of words already. Very sorry.
Here is the new approach.
Make a dictionary.js file like this.
Code:
var elvishWords = new Array();
var englishWords = new Array();
var englishDefinitions = new Array();
var elvishDefinitions = new Array();
//The code for each word has this structure.
elvishWords[0] = "wlsh";
englishWords[0] = "money";
englishDefinitions[0] = "Medium for exchanging value for goods."
elvishDefinitions[0] = "Fluvium par trado valor ala cosas."
elvishWords[1] = "glmmr";
englishWords[1] = "glamor";
englishDefinitions[1] = "Appearance of bright richness in dress and grooming."
elvishDefinitions[1] = "Anshu do brillig ricos par drou y marifos."
etc
Oh boy that elvish was tough (to invent).
Then in the HTML only include the dictionary.js like so-
Code:
<html>
<head>
<title>Elvish English Translator</title>
<script src="dictionary.js"></script>
</head>
<body>
. . .
</body>
</html>
It is possible that having englishElvish and elvishEnglish declared in both files would generate the undefined errors. I would like to know whether you had created the two .js files and whether they were in the same folder with the page.
1. I don't see any unterminated string constants in the code you posted. I also don't count 82 lines. The error probably is in the .js file, which has a multitude of string constants, therefore many opportunities to leave out a quotation mark. A quotation mark begins and terminates a string constant. A string constant is characters beginning and ending with quotation marks.
One last thing. You didn't mention it but there is another type of error in the javascript you posted. The undefined thingies, which we hope to define, elvishWords and englishWords are the names of arrays, that is lists. To refer to a particular item on the list you must use a subscript like so-
Code:
){
document.elveng.english.value = englishWords
Don't be discouraged. Programming is always a matter of trial-and-error. Well at least for me.
Again I apologize for the bad advice regarding the dictionary.