5 Replies Latest reply on Aug 29, 2014 12:01 AM by rixter123

    Extension callback issue

    AYS. HAKKIM

      Hi All

       

      I just got the problem with (html + javascript + jsx) html5 extension. Actually callback works; the control comes back to the javascript from jsx. But its not getting the value returned from jsx. But the same works out perfect in indesign; javascript callback gets the value returned from jsx.

       

      can any one please suggest immediate!

       

        • 1. Re: Extension callback issue
          rixter123 Level 1

          What is the type of the return (a string, etc)? It's hard to guess the cause without seeing any code.

          • 2. Re: Extension callback issue
            AYS. HAKKIM Level 1

            just string! even i tried by returning as an object. all those ways are working perfect in InDesign (jsx to javascript). even in "after effects" i can get control back to callback function. the only issue is, it is not getting the returned value.

            • 3. Re: Extension callback issue
              rixter123 Level 1

              Would be able to have a look if you could post a bare-minimum code snippet, both JSX and Javascript. Returning strings to the callback function works for me.

              • 4. Re: Re: Extension callback issue
                AYS. HAKKIM Level 1

                Here the code;

                 

                HTML

                -------------

                <!doctype html>

                <html>

                    <head>

                        <meta charset="utf-8">

                            <script src="./ext.js"></script>

                            <script src="./lib/CSInterface-4.0.0.js"></script>

                            <link rel="stylesheet" type="text/css" href="./style.css">

                    </head>

                    <body onLoad="onLoaded()">

                        <button id="popAlert" onClick="onClickButton('AEFT')">Pop An Alert</button>

                    </body>

                </html>

                 

                javascript

                -------------

                function onClickButton(ppid) {

                  var extScript = "$._ext_"+ppid+".popAlert()";

                  evalScript(extScript, function(a){alert(a);});

                 

                }

                 

                jsx

                ------

                $._ext_AEFT = {

                    popAlert : function()

                    {

                        alert("hi im in After Effects!");

                        return "hi. im in javascript callback!";

                    }

                };

                 

                "Returning strings to the callback function works for me."  on After Effects?? I'm using AFX CC 2014, version 13.0.0.214.

                • 5. Re: Extension callback issue
                  rixter123 Level 1

                  Sorry, I was checking with Photoshop. My bad for not noticing you are asking about After Effects.