Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. js: Uncaught ReferenceError: xxx is not defined
Forum Updated to NodeBB v4.3 + New Features

js: Uncaught ReferenceError: xxx is not defined

Scheduled Pinned Locked Moved Unsolved QtWebEngine
3 Posts 2 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    asss
    wrote on 19 Jul 2020, 09:31 last edited by
    #1

    I try to run some simple sample code that use webengine to load html file and run js function embeded in html file. But the console show that js: Uncaught ReferenceError: xxx is not defined. xxx is js function.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      asss
      wrote on 19 Jul 2020, 09:42 last edited by
      #2

      669999e5-f240-4d92-9535-97876ca93c46-image.png
      2e41cb77-0ef9-4c9d-aaf5-65a15b9e34bd-image.png
      7226b8c1-094b-4073-bdab-fa55c82eefc2-image.png

      1 Reply Last reply
      0
      • L Offline
        L Offline
        larryhems
        wrote on 22 Feb 2021, 06:56 last edited by
        #3

        There is a non-existent variable referenced somewhere. This variable needs to be declared, or you need to make sure it is available in your current script or scope otherwise , it will endup throwing this 'x' is not defined error . This usually indicates that your library is not loaded and JavaScript does not recognize the 'x'.

        To solve this error: Load your library at the beginning of all your scripts.

        There can be multiple other reasons for this issue:

        • Added JavaScript library after the script were you see that error
        • Conflict with Other JavaScript Libraries
        • Path to JavaScript library you included is not correct
        • The jQuery library file is corrupted
        • May be a chance where you are working offline
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved