Skip to main content
MusicManMD
Known Participant
April 5, 2010
Question

Error using ColdFusion.Navigate

  • April 5, 2010
  • 1 reply
  • 3623 views

I am getting the following error when I click on a specific cfmenu link:

Error processing JavaScript in markup for element cf_layoutareamyContent

Here is the link:

<cfmenuitem name="rpts" href="javaScript:ColdFusion.navigate('reports.cfm','myContent');" display="Reports" />

After clicking OK on the error the page displays as expected and the link to the cfwindow works as well.  However when I click the home menu itema nd then click this menu item again the screen goes blank.  Any ideas?

cfdebug output:

error:http: Error processing JavaScript in markup for element cf_layoutareamyContent:

Thanks in advance!

-David

    This topic has been closed for replies.

    1 reply

    Fernis
    Inspiring
    April 6, 2010

    Are you working with CF9?

    There's an incompability (I call it a bug) between CF8 and CF9.

    In CF9, You cannot target a ColdFusion.navigate() into a layoutarea.

    http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=79960

    Apparently it's not going to be fixed in the near future.

    The best solution is to place a CFDIV right within your layoutarea with an ID of choice, and  target the link there. That works both in CF8 and 9.

    --

    -Fernis - fernis.net - ColdFusion Developer For Hire

    MusicManMD
    Known Participant
    April 6, 2010

    Cna you give me an example if <cfdiv> and where I put it and how to link to it

    as I haven't used this tag before?

    Thanks!

    Fernis
    Inspiring
    April 6, 2010

    <cflayout...


    <cflayoutarea name="myContent_renamed"... >

         <cfdiv id="myContent">

         </cfdiv>

    </cflayoutarea>

    </cflayout>

    There's nothing special to it. Just add <CFDIV></CFDIV> inside the LAYOUTAREA.

    Give the layoutarea some other name, since you actually never will target anything directly to it. But since you have the cfdiv right inside the layoutarea, it's virtually the same as if you were.

    -Fernis