OK, so I fixed the Javascript to use the correct alert box code (I've 
got Flex syntax on the brain):

alert(url);

Now I see that loadIFrame() is executing -- but it executes 3 times, 
or at least I'm getting 3 javascript alert boxes each time I load the 
iframe page.


--- In flexcoders@yahoogroups.com, "byte.sensei" <[EMAIL PROTECTED]> 
wrote:
>
> 
> I've got a Flex site with several pages that load HTML content from 
an
> older HTML version of the site into an iframe that I then place 
over the
> Flash movie so it looks like the content has been embedded into the 
Flex
> UI even though it's still being loaded from the old HTML site.
> 
> I've got the following Javascript function to load the HTML content 
into
> the iframe:
> 
> function loadIFrame(url){
>   document.getElementById("myFrame").innerHTML = "<iframe 
id='myIFrame'
> src='" + url + "' frameborder='0'></iframe>";
>   Alert.show(url);
> }
> 
> I added the "Alert.show" for testing so I'd get a Javascript alert 
box
> if/when this Javascript function fires.
> 
> Inside my Flex app, I'm using the following code to refresh the 
iframe
> based on a URL:
> 
> ExternalInterface.call("loadIFrame", source);
> 
> I'm using the "show" event of a VBox component to make the
> ExternalInterface.call to the Javascript function.  I've verified 
via
> trace that the show event is firing and the ExternalInterface.call()
> function is executing, but the iframe never "loads" the URL nor 
does the
> Javascript Alert.show() function execute.
> 
> It seems to work some of the time, but not consistently and not in 
any
> pattern I can distinguish.  Am I missing something here? Is there a
> different/better approach for loading HTML content via an HTTP GET 
into
> a Flex UI?  If not, how can I get this to work 
properly/consistently?
> 
> Cheers!
>


Reply via email to