changing var java script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • telekarper
    New Member
    • Mar 2008
    • 2

    changing var java script

    i have the following code between <head> and </head>
    <script language="JavaS cript1.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,
    [CODE=javascript]<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>[/CODE]

    But i dont now how to make the relation en the changes.
    Last edited by gits; Mar 25 '08, 12:55 PM. Reason: added code tags
  • sukatoa
    Contributor
    • Nov 2007
    • 539

    #2
    Originally posted by telekarper
    i have the following code between <head> and </head>
    <script language="JavaS cript1.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?

    Comment

    • telekarper
      New Member
      • Mar 2008
      • 2

      #3
      So far as i now yes. It's the first time i used this forum maybe i'm sitting in the wrong chamber?

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        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

        Comment

        Working...