Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my Model class I use a function which gather information from an `xml` file and give it to a Hash table property:
Attributes.envProp._ControlsLangs.Add(keyName, LangValue)

Now at load phase in my `loginIndex` page I have a JavaScript file.
With which I want to fire the previous function, and if it is `true` (means success).
Pass the Hash Table property into an array.
In order in a later action to use the "key" of the Table to open the control and the "value" to assign as `innerHTML` to the control.
The script is like that:
<script type="text/javascript">
        onload = function ChangeLang() {
            var LangProp = '<%= dataEntry.My.Resources.Attributes.logHandler.LoadLangs(MyClass.Page.GetType.BaseType.Name)%>';
            var controlArray = Array;
            if (LangProp = 'True') {
            console.log(<%= dataEntry.My.Resources.Properties.ControlsLangs%>);                
            } else {

            }
        }
    </script>

Here the `LangProp` it is load it and controlled from the script.
But when it is the time to see if the table comes into the script it threw me the error of:
Index:23
 Uncaught ReferenceError: System is not defined
     at ChangeLang (Index:23)
        ChangeLang @ Index:23
        load (async)
        (anonymous) @ Index:18

Which of course means that some issue provided between the `Model class` and the Java script.
Is someone there to assist me?

What I have tried:

Nothing until now.









.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900