locked
Programming issue

    Question

  • Hi

    I recently decided to start teaching myself how to create apps for the windows store as I am South African Based I would love to make some Apps that will work in South Africa because most Apps can't do that. So I started following your tut on how to create windows 8 apps but ran into a snag on the hello world one the very first one 

    Part 1: Create a "Hello, world" app (Windows Store apps using JavaScript and HTML)

    By Step 5 I filled out everything correctly and I keep getting an error (0x800a138f - JavaScript runtime error: Unable to get property 'value' of undefined or null reference).

    I tried resorting to google but that didn't help me much perhaps somebody here can be of some assistance.

    Thank you. 

    Tuesday, June 25, 2013 1:46 PM

Answers

  • what about your html? do you have a control named 'nameInput'? (mind the casing)

    I'm familiar with the Blank template, your code is the one I don't known ;)


    http://about.me/sebagomez


    • Edited by sebastian gomez Tuesday, June 25, 2013 7:34 PM more
    • Marked as answer by MKD7036611 Tuesday, June 25, 2013 9:08 PM
    Tuesday, June 25, 2013 7:34 PM

All replies

  • can you paste the piece of cose where you get that error?

    That is often caused by calling an undefined object's property (value). Check if your objects has been intilized (has data)


    http://about.me/sebagomez

    Tuesday, June 25, 2013 4:39 PM
  • can you paste the piece of cose where you get that error?

    That is often caused by calling an undefined object's property (value). Check if your objects has been intilized (has data)


    http://about.me/sebagomez

    same here waiting for a detailed report :)

    sincerely,

    -Alican

    Tuesday, June 25, 2013 6:32 PM
  • // For an introduction to the Blank template, see the following documentation:
    // http://go.microsoft.com/fwlink/?LinkId=232509
    (function () {
        "use strict";

        WinJS.Binding.optimizeBindingReferences = true;

        var app = WinJS.Application;
        var activation = Windows.ApplicationModel.Activation;

        app.onactivated = 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.
                }
                args.setPromise(WinJS.UI.processAll());

                // Retrieve the button and register our event handler.
                var helloButton = document.getElementById("helloButton");
                helloButton.addEventListener("click", buttonClickHandler, false);
            }
        };

        app.oncheckpoint = function (args) {
            // TODO: This application is about to be suspended. Save any state
            // that needs to persist across suspensions here. You might use the
            // WinJS.Application.sessionState object, which is automatically
            // saved and restored across suspension. If you need to complete an
            // asynchronous operation before your application is suspended, call
            // args.setPromise().
        };

        function buttonClickHandler(eventInfo) {

            var userName = document.getElementById("nameInput").value;
            var greetingString = "Hello, " + userName + "!";
            document.getElementById("greetingOutput").innerText = greetingString;
        }

        app.start();
    })();

    This the code but like I said I just started practicing this want to learn to do this properly...

    The underline part is the part that is giving the error

     It is the code from the tut that is on the site
    • Edited by MKD7036611 Tuesday, June 25, 2013 6:47 PM for got to add something
    Tuesday, June 25, 2013 6:45 PM
  • what about your html? do you have a control named 'nameInput'? (mind the casing)

    I'm familiar with the Blank template, your code is the one I don't known ;)


    http://about.me/sebagomez


    • Edited by sebastian gomez Tuesday, June 25, 2013 7:34 PM more
    • Marked as answer by MKD7036611 Tuesday, June 25, 2013 9:08 PM
    Tuesday, June 25, 2013 7:34 PM
  • I completely forgot about the html... Thanks for reminding me about that and got it fixed... 
    Tuesday, June 25, 2013 9:09 PM