View comments | RSS feed

Using history management in a custom HTML file

When you place a Flex application inside a custom HTML page instead of generating the HTML page automatically, you must set up the HTML page to support history management if you want to use it.

The following steps are required to support history management:

  1. Include the following text at the top of the HTML document:
    <script language='javascript' charset='utf-8' 
    src='/flex/flex-internal?action=js'></script>
  2. Add the historyUrl and lconid parameters to the flashVars variable for both the object and embed tags, as the following example shows. You must add these parameters in JavaScript, because history management uses a JavaScript variable called lc_id.
    document.write("  <param name='flashVars' value='historyUrl=%2Fflex%2Fflex-
    internal%3Faction%3Dhtml&lconid=" + lc_id +"'>");
    
  3. Add the _history iframe, as the following example shows:
    <iframe src='/flex/flex-internal?action=html' name='_history' 
    frameborder='0' scrolling='no' width='22' height='0'></iframe>
    

Version 1.5

Comments


No screen name said on Jan 4, 2005 at 7:05 AM :
There are two flaws in the above code snippets.

1) the path '/flex/flex-internal?action=js' has to be '/flex/flex-internal?action=history_js'

2) the path '/flex/flex-internal?action=html' has to be '/flex15/flex-internal?action=history_html'
mpeterson said on Jan 7, 2005 at 6:45 AM :
Regarding the previous comment, it is correct that the paths are incorrect as currently described on this page. The context paths throughout should be consistent. In the second correction, the context path should start with /flex instead of /flex15 to be consistent with the first correction.
Also note that the context path should match the context path for the web application (for example, /dev/flex-internal?action=history_html when the context root is /dev).
stevermac said on Nov 29, 2005 at 7:17 AM :
how do you load this history manager via https? right now it's throwing a "nonsecure" message in our custom html wrapper.
smgilson said on Nov 29, 2005 at 8:58 AM :
It could be a configuration issue. See if this link helps. http://weblogs.macromedia.com/lin/archives/flex/security/index.cfm

If that does not get you going, you might try to contact Flex Customer Support at: http://www.macromedia.com/support/flex/

Stephen Gilson
Flex Doc

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/15/flex_docs_en/00000640.htm