flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanloflex <sanhappy...@gmail.com>
Subject How to call JavaScript function in Flex-iFrame html?
Date Tue, 09 Dec 2014 11:15:16 GMT
In my flex application, I'm having a flex-iframe in which I'm loading a
HTMLfile. I have to call a javascript function defined in loaded HTML file.

I'm making use of callIFrameFunction('jsfunctionname'). I'm using
flex-iframe-1.4.6.swc & flex 4.1 SDK.

But, the javascript function is not invoked anyhow and it is not executed. I
have placed the html file in the same directory where the mxml file resides.

I have embedded the code below. Kindly, if you got some ideas, please share
your views.

*<flexiframe:IFrame id="iFrameWithJSfunctions"
                       label="Map"
                       source="pageWithJSfunctions.html"
                       frameLoad="callShowAlert(event)"
                       width="400"
                       height="120"
                       overlayDetection="true" />

/**
     * Call the 'showAlert()' JavaScript method.
     */
    private function callShowAlert(event:Event):void
    {
        iFrameWithJSfunctions.callIFrameFunction('showAlert');
    }*

Where *showAlert* is a js function in *pageWithJSfunctions.html* file.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/How-to-call-JavaScript-function-in-Flex-iFrame-html-tp9035.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message