J Esters
J Esters

Reputation: 11

AJAX in MASA CMS

MASA Version: 7.4.4 jQuery: v1.11.2 ColdFusion Server: 2021

I have MASA installed and working, I am trying to set up an AJAX form submit (code below)

submitHandler: function(form) {                $.ajax({                    url: "/certification-letter/process-cert-request?method=getCertResult",                    type: "POST",                    data: $(form).serialize(),                    success: function(response) {                        console.log(response);                    }                            })            }

the page is called but the MASA renderer is trying to interpret the page and giving the following output

certification-letter/:315 <div class="mura-region mura-region-loose">
                    <div class="mura-region-local"><p>
    <style type="text/css">
        .mura-core-errorBox {
            margin: 10px auto 10px auto;
            width: 90%;
        }

        .mura-core-errorBox h1 {
            font-size: 100px;
            margin: 5px 0px 5px 0px;
        }

    </style>
    <div class="mura-core-errorBox">
        <h2>500 Error</h2>
        
            <h3>Variable POST is undefined.<br /></h3>
        
                <hr />
                
                    Column: 0<br />
                
                    ID: ??<br />
                
                    Line: 3<br />
                
                    Raw Trace:  at cfprocessCertRequest2ecfm625165937.runPage(D:\websites\MasaCMS7\sites\optc\modules\custom\processCertRequest.cfm:3)<br />
                
                    Template: D:\websites\MasaCMS7\sites\optc\modules\custom\processCertRequest.cfm<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CFINCLUDE<br />
                
                    Line: 2795<br />
                
                    Raw Trace:  at cfcontentRenderer2ecfc283219716$funcDSPINCLUDE.runFunction(D:\websites\MasaCMS7\core\mura\content\contentRenderer.cfc:2795)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentRenderer.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_UDFMETHOD<br />
                
                    Line: 262<br />
                
                    Raw Trace:  at cfcfobject2ecfc1451733467$funcINVOKEMETHOD.runFunction(D:\websites\MasaCMS7\core\mura\cfobject.cfc:262)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\cfobject.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 135<br />
                
                    Raw Trace:  at cfMasaScope2ecfc478104320$funcONMISSINGMETHOD.runFunction(D:\websites\MasaCMS7\core\mura\MasaScope.cfc:135)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\MasaScope.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 1<br />
                
                    Raw Trace:  at Statement202.evaluate(<generated>:1)<br />
                
                    Template: <generated><br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_CFPAGE<br />
                
                    Line: 2734<br />
                
                    Raw Trace:  at cfcontentRenderer2ecfc283219716$funcSETDYNAMICCONTENT.runFunction(D:\websites\MasaCMS7\core\mura\content\contentRenderer.cfc:2734)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentRenderer.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 88<br />
                
                    Raw Trace:  at cfcontentRendererUtility2ecfc1918983114$funcRENDEREDITABLEATTRIBUTE.runFunction(D:\websites\MasaCMS7\core\mura\content\contentRendererUtility.cfc:88)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentRendererUtility.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 3089<br />
                
                    Raw Trace:  at cfcontentRenderer2ecfc283219716$funcRENDEREDITABLEATTRIBUTE.runFunction(D:\websites\MasaCMS7\core\mura\content\contentRenderer.cfc:3089)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentRenderer.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_UDFMETHOD<br />
                
                    Line: 1918<br />
                
                    Raw Trace:  at cfcontentRenderer2ecfc283219716$funcDSPBODY.runFunction(D:\websites\MasaCMS7\core\mura\content\contentRenderer.cfc:1918)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentRenderer.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_UDFMETHOD<br />
                
                    Line: 262<br />
                
                    Raw Trace:  at cfcfobject2ecfc1451733467$funcINVOKEMETHOD.runFunction(D:\websites\MasaCMS7\core\mura\cfobject.cfc:262)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\cfobject.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 135<br />
                
                    Raw Trace:  at cfMasaScope2ecfc478104320$funcONMISSINGMETHOD.runFunction(D:\websites\MasaCMS7\core\mura\MasaScope.cfc:135)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\MasaScope.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 1<br />
                
                    Raw Trace:  at cfblank2ecfm1828225259.runPage(D:\websites\MasaCMS7\sites\optc\themes\OPTC\templates\blank.cfm:1)<br />
                
                    Template: D:\websites\MasaCMS7\sites\optc\themes\OPTC\templates\blank.cfm<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CFINCLUDE<br />
                
                    Line: 130<br />
                
                    Raw Trace:  at cfstandardHTMLTranslator2ecfc246981550$funcTRANSLATE.runFunction(D:\websites\MasaCMS7\core\mura\Translator\standardHTMLTranslator.cfc:130)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\Translator\standardHTMLTranslator.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 169<br />
                
                    Raw Trace:  at cfpluginStandardEventWrapper2ecfc477641408$funcTRANSLATE.runFunction(D:\websites\MasaCMS7\core\mura\plugin\pluginStandardEventWrapper.cfc:169)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\plugin\pluginStandardEventWrapper.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 119<br />
                
                    Raw Trace:  at cfstandardEventsHandler2ecfc1389109391$funcSTANDARDTRANSLATIONHANDLER.runFunction(D:\websites\MasaCMS7\core\mura\Handler\standardEventsHandler.cfc:119)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\Handler\standardEventsHandler.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CFINVOKE<br />
                
                    Line: 1404<br />
                
                    Raw Trace:  at cfutility2ecfc1372360249$funcINVOKEMETHOD.runFunction(D:\websites\MasaCMS7\core\mura\utility.cfc:1404)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\utility.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 119<br />
                
                    Raw Trace:  at cfpluginStandardEventWrapper2ecfc477641408$funcHANDLE.runFunction(D:\websites\MasaCMS7\core\mura\plugin\pluginStandardEventWrapper.cfc:119)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\plugin\pluginStandardEventWrapper.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 454<br />
                
                    Raw Trace:  at cfstandardEventsHandler2ecfc1389109391$funcSTANDARDDORESPONSEHANDLER.runFunction(D:\websites\MasaCMS7\core\mura\Handler\standardEventsHandler.cfc:454)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\Handler\standardEventsHandler.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CFINVOKE<br />
                
                    Line: 1404<br />
                
                    Raw Trace:  at cfutility2ecfc1372360249$funcINVOKEMETHOD.runFunction(D:\websites\MasaCMS7\core\mura\utility.cfc:1404)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\utility.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 119<br />
                
                    Raw Trace:  at cfpluginStandardEventWrapper2ecfc477641408$funcHANDLE.runFunction(D:\websites\MasaCMS7\core\mura\plugin\pluginStandardEventWrapper.cfc:119)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\plugin\pluginStandardEventWrapper.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 909<br />
                
                    Raw Trace:  at cfcontentServer2ecfc1598635140$funcDOREQUEST.runFunction(D:\websites\MasaCMS7\core\mura\content\contentServer.cfc:909)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentServer.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_UDFMETHOD<br />
                
                    Line: 294<br />
                
                    Raw Trace:  at cfcontentServer2ecfc1598635140$funcPARSEURL.runFunction(D:\websites\MasaCMS7\core\mura\content\contentServer.cfc:294)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentServer.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_UDFMETHOD<br />
                
                    Line: 380<br />
                
                    Raw Trace:  at cfcontentServer2ecfc1598635140$funcPARSEURLROOT.runFunction(D:\websites\MasaCMS7\core\mura\content\contentServer.cfc:380)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentServer.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 780<br />
                
                    Raw Trace:  at cfcontentServer2ecfc1598635140$funcHANDLEROOTREQUEST.runFunction(D:\websites\MasaCMS7\core\mura\content\contentServer.cfc:780)<br />
                
                    Template: D:\websites\MasaCMS7\core\mura\content\contentServer.cfc<br />
                
                    Type: CFML<br />
                
                <br />
                
                <hr />
                
                    Column: 0<br />
                
                    ID: CF_TEMPLATEPROXY<br />
                
                    Line: 75<br />
                
                    Raw Trace:  at cfindex2ecfm1095138961.runPage(D:\websites\MasaCMS7\index.cfm:75)<br />
                
                    Template: D:\websites\MasaCMS7\index.cfm<br />
                
                    Type: CFML<br />
                
                <br />
                
    </div>
</p></div>
                    </div>

what's the best way to implement ajax in MASA CMS?

Upvotes: 0

Views: 27

Answers (0)

Related Questions