7/8/2010 8:40:52 AM
Title:
Refresh a page
How to refresh a page in Flex inside the program by clicking a button?Please Help
Thankyou....
Inder
Points: 2980
Posts:0
7/8/2010 9:31:56 AM
use the externalInterface to call a javascript function inside the html page to refresh the page.
Rayan
Points: 700
Posts:0
7/8/2010 10:20:20 AM
here is the code sample to refresh the html page from flex application using actionscript 3. we are using here navigateToURL to execute java script from within the flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1024" applicationComplete="init()" minHeight="768">
<mx:Script>
<![CDATA[
function init(){
}
protected function button1_clickHandler(event:MouseEvent):void
{
navigateToURL(new URLRequest("javascript:location.reload(true);"), "_self");
}
]]>
</mx:Script>
<mx:Button x="187" y="101" label="Button" click="button1_clickHandler(event)"/>
</mx:Application>