locked
External links not working after working through Quick Start: single-page navigation

    Question

  • I have run through the "Quick Start: Single-page navigation" tutorial and now find that external links within my content bring up javascript runtime errors:

    Exception is about to be caught by JavaScript library code at line 6882, column 17 in ms-appx://microsoft.winjs.2.0/js/base.js 0x800a138f - JavaScript runtime error: Unable to get property 'cloneNode' of undefined or null reference

    Exception is about to be caught by JavaScript library code at line 83,  column 21 in ms-appx://5cbefc4d-ea53-4933-a82c-2103b68ec15e/js/navigator.js 0x800a138f - JavaScript runtime error: Unable to get property 'style' of undefined or null reference

    I was hoping the guides would be useful and help me build a very simple app as I am not a JavaScript expert but cant figure out why this would happen as I haven't added or changed anything else.

    I have tried the iframe method but I get the the same errors still.

    As soon as I comment out:

    WinJS.Utilities.query("a").listen("click", linkClickEventHandler, false);

    External links work perfectly.


    • Edited by matrix_digital Thursday, November 21, 2013 12:01 PM additional info
    Thursday, November 21, 2013 11:56 AM

Answers

  • Ok I have resolved my own issue!

    I changed ("a") to (".navi") and classed my internal links as navi!

    I guess this was the easy option and sure there is another way maybe but this will do! :)
    Thursday, November 21, 2013 12:07 PM