Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8670503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:43:17+00:00 2026-06-12T18:43:17+00:00

I have a navigation app. In the page Control corresponding js files are present.

  • 0

I have a navigation app. In the page Control corresponding js files are present. I want to access an external js file which is in the project js folder. I have specified in

commonFunctions.js

WinJS.Namespace.define(

'commonFunctions', {

        authenticate: authenticate

    });

Now when accessing the method in the PageControl’s js (page2.js) file

commonFunctions.authenticate();

it gives an error:

0x800a1391 – JavaScript runtime error: ‘commonFunctions’ is undefined

If there is a handler for this exception, the program may be safely continued.

Is this the right way to do this? Or am I missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:43:19+00:00Added an answer on June 12, 2026 at 6:43 pm

    I believe the issue you’re having is either that you have not referenced your script file inside the page you are loading or you have not wrapped your commonFunctions object in a function.

    I tried this:
    script.js

    (function () {
        WinJS.Namespace.define("CommonObject", {
            auth: function () {
                return true;
            }
        });
    }());
    

    default.js

        app.addEventListener("activated", function (args) {
            if (args.detail.kind === activation.ActivationKind.launch) {
                if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
                    // TODO: This application has been newly launched. Initialize
                    // your application here.
                } else {
                    // TODO: This application has been reactivated from suspension.
                    // Restore application state here.
                }
    
                if (app.sessionState.history) {
                    nav.history = app.sessionState.history;
                }
                args.setPromise(WinJS.UI.processAll().then(function () {
                    var test = CommonObject.auth(); // Comes out true and no exceptions
                    if (nav.location) {
                        nav.history.current.initialPlaceholder = true;
                        return nav.navigate(nav.location, nav.state);
                    } else {
                        return nav.navigate(Application.navigator.home);
                    }
                }));
            }
        });
    

    default.html

    <script src="/js/script.js"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tab navigation page in my rails app which is shared across
I have UITableViewController (initiated by the Navigation-based app project template). I am overriding loadView
My Case: I have original Page Control app from Apple. I would like to
I have a navigation-based app and say my root controller A causes a viewController
i have just converted an app i was making from a navigation controller app
I have an app with navigation controller , but my app also has a
I have an app whose navigation tree is described on the attached image. Basically,
In the iPod app, the navigation views have the default status bar style, and
I'm writing a Navigation-Based iPhone app, and I'd like to have a UIToolBar docked
I have created a flexible navigation bar in my app that will show custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.