1 Reply Latest reply on Jan 16, 2012 6:26 AM by batiesphoto

    Calling javascript function with StageWebView problems

    hanchan07

      I have a test html page I made to R&D some functionality, in my view I have a stageWebView and am calling a local html file from inside the app like this:

       

      stageWebView.loadURL(new File(new File('app:/assets/html/reports.html?stuff=1234').nativePath).url);

       

      I then try and call a javascript function called tester() from the html page like this:  stageWebView.loadURL("javascript:tester()");

       

      And the only thing I see in the debug console is:

      ReferenceError: Can't find variable: tester

       

      From what I have found online this is the way that this should be done.  Does anyone have any ideas?  I am not running this on a device yet, just in the FlashBuilder emulator.

       

      Thanks for any pointers.