469,343 Members | 5,732 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

changing var java script

i have the following code between <head> and </head>
<script language="JavaScript1.2" src="menun_data.js" ></script>
as a part of a dropdownmenu.
i want to change menun_data.js for menuf_data.js witch is the same file in an other language.
I will use 4 languages, therfore i defined the following array,
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  menu= new Array();
  3. menu[0]="menun_data.js";
  4. menu[1]="menuf_data.js";
  5. menu[2]="menud_data.js";
  6. menu[3]="menue_data.js";
  7. </script>
But i dont now how to make the relation en the changes.
Mar 24 '08 #1
3 1142
sukatoa
539 512MB
i have the following code between <head> and </head>
<script language="JavaScript1.2" src="menun_data.js" ></script>
as a part of a dropdownmenu.
i want to change menun_data.js for menuf_data.js witch is the same file in an other language.
I will use 4 languages, therfore i defined the following array,
<script type="text/javascript">
menu= new Array();
menu[0]="menun_data.js";
menu[1]="menuf_data.js";
menu[2]="menud_data.js";
menu[3]="menue_data.js";
</script>

But i dont now how to make the relation en the changes.
Did you also post this into javascript/ajax forum?
Mar 25 '08 #2
So far as i now yes. It's the first time i used this forum maybe i'm sitting in the wrong chamber?
Mar 25 '08 #3
gits
5,390 Expert Mod 4TB
that is very redundant ... just extract the language relevant things and put them in variables ... after that we could find a good solution for your problem ... since it seems that you don't want to use a database for this?

kind regards
Mar 25 '08 #4

Post your reply

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

Similar topics

6 posts views Thread by Boyd Reilly | last post: by
7 posts views Thread by Frostillicus | last post: by
16 posts views Thread by chris | last post: by
14 posts views Thread by Arne | last post: by
3 posts views Thread by bulldog8 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.