newbie - need help changing variable with onClick

T

Tom Wolfe

Hello,

I'm designing a multi language page that will give visitors a chance to see
instructions in a variety of languages. I saved each language statement as
an external JS file using a document.write statement to display the text
when it is called.

What I would like to do is, say when a Russian visitor wants to see the
paragraph in Russian, they click a link that says "Russian" which changes
the variable I use to call the JS file, for example, calling the "ru.js"
file instead of the "en.js" file.

Since the multi language instructions are located in a variety of places on
the page, I would want this variable change to re-load the page with a
"changed" global variable (ie, var lang = "ru", instead of "en"), therefore
all statements that had previously called "en" files to be written would now
call "ru" files.

I'm new at javascript, so even these relatively simple concepts are quite a
challenge for me.

thanks for any advice.

Tom
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top