Skip to main content
Known Participant
February 10, 2010
Answered

Coldfusion.navigate not working CF8

  • February 10, 2010
  • 3 replies
  • 1697 views

Trying to figure out how to get the pages linked in the menu to populate the second layout area.  From what I've read the code should be in the right syntax for it to work, however when I click on a menu button, I get a whole lot of nothing happening.  I was using the ticket entries to play around with different solutions, but all to no avail.  Is there some sort of javascript that I need to have above this to make it work or something?  Any help is appreciated.

<cfajaximport tags="cfdiv,cfgrid,cfform,cfpod">
<cflayout type="vbox" align="center">
    <cflayoutarea name="menu" overflow="visible" align="center" style="width:100%">
    <cfmenu type="horizontal" bgColor="##c0c0c0" selecteditemcolor="##C8CED6" >
        <cfmenuitem display="Index" href="javascript:Coldfusion.navigate('index.cfm','mainArea')"></cfmenuitem>
        <cfmenuitem display="Tickets">
            <cfmenuitem name="open" display="View Open Tickets" href="javaScript:Coldfusion.navigate('openTicket.cfm','mainArea')"  />
            <cfmenuitem name="Search" display="Search Old Tickets" href="searchTicket.cfm" target="mainArea" />           
        </cfmenuitem>
        <cfmenuitem display="Alerts">
            <cfmenuitem name="New" display="New Alert" href="javascript:Coldfusion.navigate('alerts.cfm','main')"  />           
            <cfmenuitem name="Active" display="Active Alerts" href="javascript:Coldfusion.navigate('alertsFollowUp.cfm','main')"  />                       
            <cfmenuitem name="History" display="Alert History" href="javascript:Coldfusion.navigate('alertHistory.cfm','main')"  />                       
        </cfmenuitem>
        <cfmenuitem display="Inventory">
            <cfmenuitem name="pc" display="PC Inventory" href="javascript:Coldfusion.navigate('pc.cfm','mainArea')"  />       
            <cfmenuitem name="searchpc" display="Search PC Inventory" href="javascript:Coldfusion.navigate('pcSearch.cfm','mainArea')"  />       
            <cfmenuitem name="licensing" display="Licensing" href="javascript:Coldfusion.navigate('license.cfm','mainArea')"  />                       
            <cfmenuitem name="room" display="Room Inventory" href="javascript:Coldfusion.navigate('roomSelect.cfm','mainArea')"  />                       
            <cfmenuitem name="laptop" display="Laptop Administration" href="javascript:Coldfusion.navigate('laptopAdmin.cfm','mainArea')"  />                       
        </cfmenuitem>
        <cfmenuitem display="RACF">
            <cfmenuitem name="RACFAdd" display="RACF - Add" href="javascript:Coldfusion.navigate('racfSearch.cfm','maiArean')"  />           
            <cfmenuitem name="RACFSearch" display="RACF Search" href="javascript:Coldfusion.navigate('racfADD.cfm','mainArea')"  />           
        </cfmenuitem>
        <cfmenuitem display="Tasks">
            <cfmenuitem name="taskLog" display="Task Log" href="javascript:Coldfusion.navigate('taskLog.cfm','mainArea')"  />           
            <cfmenuitem name="taskClosed" display="Tasks Closed" href="javascript:Coldfusion.navigate('taskLogClosed.cfm','mainArea')"  />                       
        </cfmenuitem>
        <cfmenuitem display="Change Log">
            <cfmenuitem name="changeAdd" display="Add New Change" href="javascript:Coldfusion.navigate('changeAdd.cfm','mainArea')"  />           
            <cfmenuitem name="recentChange" display="Recent Changes" href="javascript:Coldfusion.navigate('changeLog.cfm','mainArea')"  />           
            <cfmenuitem name="changeArchive" display="Change Archives" href="javascript:Coldfusion.navigate('changeArchive.cfm','mainArea')"  />           
        </cfmenuitem>
        <cfmenuitem  display="Logout" href="logout.cfm"></cfmenuitem>
    </cfmenu>
    </cflayoutarea>
    <cflayoutarea name="mainArea" align="center" style="background-color:##CCDBEF; height:100%" >

          blah

          blah

          blah default page stuff

     </cflayoutarea>

</cflayout>

    This topic has been closed for replies.
    Correct answer BKBK

    There are 3 things, which should fix it.

    1) at least one spelling mistake: mainArea in place of maiArean in <cfmenuitem name="RACFAdd" display="RACF - Add" href="javascript:Coldfusion.navigate('racfSearch.cfm','maiArean')"  />

    2) case-sensitivity: use ColdFusion.navigate in place of Coldfusion.navigate;

    3) (this probably qualifies as a bug): Coldfusion's Javascript apparatus prefixes the container name of a cflayoutarea element with cf_layoutarea. So, you should replace all occurrences of 'mainArea'  in the cfmenuitem tags with 'cf_layoutareamainArea'.

    added edit: First do a run without the fix I suggested in 3). You might not need the fix in CF8, but you certainly need it in CF9, where there is almost certainly a bug.

    3 replies

    BKBK
    Community Expert
    BKBKCommunity ExpertCorrect answer
    Community Expert
    February 20, 2010

    There are 3 things, which should fix it.

    1) at least one spelling mistake: mainArea in place of maiArean in <cfmenuitem name="RACFAdd" display="RACF - Add" href="javascript:Coldfusion.navigate('racfSearch.cfm','maiArean')"  />

    2) case-sensitivity: use ColdFusion.navigate in place of Coldfusion.navigate;

    3) (this probably qualifies as a bug): Coldfusion's Javascript apparatus prefixes the container name of a cflayoutarea element with cf_layoutarea. So, you should replace all occurrences of 'mainArea'  in the cfmenuitem tags with 'cf_layoutareamainArea'.

    added edit: First do a run without the fix I suggested in 3). You might not need the fix in CF8, but you certainly need it in CF9, where there is almost certainly a bug.

    Inspiring
    February 20, 2010
    3) (this probably qualifies as a bug): Coldfusion's Javascript apparatus prefixes the container name of a cflayoutarea element with cf_layoutarea. So, you should replace all occurrences of 'mainArea'  in the cfmenuitem tags with 'cf_layoutareamainArea'.

    added edit: First do a run without the fix I suggested in 3). You might not need the fix in CF8, but you certainly need it in CF9, where there is almost certainly a bug.

    It's definitely only an issue in CF9.

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

    --

    Adam

    BKBK
    Community Expert
    Community Expert
    February 21, 2010

    Good to see they're working on the ColdFusion.navigate bug in CF9. Thanks for the link, Adam.

    Inspiring
    February 20, 2010
    however when I click on a menu button, I get a whole lot of nothing happening.

    That's odd.  because I get a whole lot of JavaScript errors happening.

    Do you not get those happening?

    --

    Adam

    Inspiring
    February 20, 2010
    however when I click on a menu button, I get a whole lot of nothing happening.

    That's odd.  because I get a whole lot of JavaScript errors happening.

    Looing into this further... I think perhaps you should bear in mind that JavaScript is case-sensitive, and review your code.

    --

    Adam

    rdhelmsAuthor
    Known Participant
    February 19, 2010

    Any takers?