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.

call JS function from parent/top window?

Home Forums Puzzles call JS function from parent/top window?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #13978
    novator83
    Customer

    Hi,

    is there some puzzle with possibility to call JS function which was loaded in top HTML window?

    For instance; how to achieve this
    window.parent.someJSfunction();
    without manually programming visual_logic.js file?

    It would be nice to create some kind of “portal” puzzle, where you could write some code directly, what do you think?

    #13988

    Hi,

    how to achieve this
    window.parent.someJSfunction();

    you can use the generic call JS function puzzle which calls a function from your_app.js, which in turn, calls JavaScript from the top window. ;-)

    where you could write some code directly, what do you think?

    this is an interesting idea, let us sleep on it :good:

    Chief 3D Verger | LinkedIn | Twitter

    #13995
    novator83
    Customer

    Oh, this works now…must have made some mistake somewhere. TNX!!! :yahoo:

    function prepareExternalInterface(app) {
        app.ExternalInterface.myJSFunction = function() {
            window.parent.someJSfunction();
        }
    }

    PS: Nice work with ease-in and ease-out puzzles! :good:

    #14002

    glad you worked it out! :good:

    Chief 3D Verger | LinkedIn | Twitter

    #15723
    scalare
    Customer

    where you could write some code directly, what do you think?

    I’d like to second that idea. There are some times where a direct addition of javascript code inside the puzzles could make things much easier, more so for advanced programmers. Or eventually, have puzzles that are a direct translation of javascript statements, so that we can mix higher level puzzles with lower level ones as needed.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.