0

I am trying to create Win 8 app using TypeScript .. I want to make master page .. so what i did was using this code

<head>
<script>
        function OpenContent(item) {
            $("#Master").load('Views/' + item);
        }
    </script>
</head>
<body>
    <h1>TypeScript HTML App</h1>
    <input type="button" onclick="OpenContent('UsersPage.html');" name="name" value="Users" class="btn btn-primary" />
    <div id="Master">
        Loading...
    </div>
</body>

i had a security problem on loading content with this code but i solve it with this

now the problem is the inner code in 'UsersPage.html' not running .. i made something like this

// this is UsersPage.html
<script>
    $(document).ready(function () {
        document.getElementById("divList").innerHTML = "<a href='http://www.google.com'>Google</a>";

    });
</script>

<div>
    <div style="width:100%;height:300px; background-color:lightblue;" id="LayoutRoot">
        <div id="divList" class="col-lg-3" style="height:100%;width:100%; background-color:red;">

        </div>
    </div>
</div>

but it not firing at all .. the content loaded successfully but still empty i can complete my app without master page but i will repeat so much codes, so any ideas to solve this issue or any other ideas to organize my application with master page thank you :)

Community
  • 1
  • 1
Amir Imam
  • 871
  • 1
  • 12
  • 23
  • any console errors? – madalinivascu Mar 03 '17 at 08:11
  • yes so many errors .. but it shows before clicking load button .. and they all are same .. something like: The app couldn’t resolve ms-appx://b992e857-9e76-4f18-a05c-1b34ad75ed00/app.css because of this error: RESOURCE_NOT_FOUND. Unhandled exception at line 10, column 13 in ms-appx://b992e857-9e76-4f18-a05c-1b34ad75ed00/Models/DbEntities.js 0x800a03f6 - JavaScript runtime error: Invalid character – Amir Imam Mar 03 '17 at 08:22

0 Answers0