We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Cannot read properties of undefined

Home Forums Puzzles Cannot read properties of undefined

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #51495
    sirhc
    Customer

    Hi Verge’rs,
    I’m using:
    v3d.puzzles.procedures[‘SetScreenScale’]();
    to trigger a procedure. I’m using it in another function as well, It works fine there, but here it say:
    Cannot read properties of undefined (reading ‘procedures’)at myFunction

    Here is my function (in the body):

    <script >
    var x = window.matchMedia(“(max-aspect-ratio: 5/5)”)
    myFunction(x) // Call listener function at run time
    x.addListener(myFunction) // Attach listener function on state changes

    function myFunction(x) {
    var element2 = document.getElementById(“Configmenu”);
    if (x.matches) { // If media query matches
    document.body.style.backgroundColor = “yellow”;
    document.getElementById(“page3DmenuHor”).appendChild(element2);
    v3d.puzzles.procedures[‘SetScreenScale’]();
    } else {
    document.body.style.backgroundColor = “pink”;
    document.getElementById(“page3Dmenu”).appendChild(element2);
    v3d.puzzles.procedures[‘SetScreenScale’]();
    }
    }
    </script>

    Is this a bug or am I doing something wrong??,…probably the last :wacko:

    found out: has to do with the loading porcedures of the page:

    calling procedures from js

    Technical Artwork Specialist@TBL.nl

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.