var rtnHTML = ""; var APIPostToNewWindow = false; var formResultHTML = ""; var defaultResultCallback = "application.ADF.forms.renderAddEditFormResult"; var formResultCallbackArgs = arguments; /* // IMPORTANT: The use of "customizedFinalHtml" has been DEPRECATED. // CommonSpot 10 JS and CSS resources will NOT be available or run using the customizedFinalHtml approach // Only HTML and inline JS an CSS with render // Please use the formResultCallback and build a callback with a path to a method in memory or // path to .cfm module file to handle processing after the form has been submitted!! */ // If we do NOT have a resultCallback path // Use the default resultCallback method path if ( LEN(TRIM(arguments.formResultCallback)) EQ 0 ) arguments.formResultCallback = defaultResultCallback; // DEV NOTE: An example of an Alternate option for a Form Result Module // resultCallback = "/customcf/adfFormResultModule.cfm"; // file on QAbase10 // If customizedFinalHtml has a value pass it through and clear the resultCallback and resultCallbackArgs if ( LEN(TRIM(arguments.customizedFinalHtml)) ) { // Pass the customizedFinalHtml to the Form ( to a pre-submit hidden field ) formResultHTML = arguments.customizedFinalHtml; // And make sure to clear the resultCallback and the resultCallbackArgs arguments.formResultCallback = ""; formResultCallbackArgs = StructNew(); } variables.scripts.loadJQuery(noConflict=true); variables.scripts.loadADFLightbox(); // DEV NOTES: use this dump to see what we are passing as arguments to the RenderSimpleForm resultCallbackArgs(arguments) //application.ADF.utils.doDUMP(formResultCallbackArgs,"formResultCallbackArgs",0); // Return the HTML for the form rtnHTML = server.CommonSpot.UDF.UI.RenderSimpleForm(dataPageID=arguments.dataPageID, formID=arguments.formID, postToNewWindow=APIPostToNewWindow, customizedFinalHtml=formResultHTML, behaveAsSimpleForm=arguments.behaveAsSimpleForm, resultCallback=arguments.formResultCallback, resultCallbackArgs=formResultCallbackArgs); return rtnHTML; var formResultFooterJS = ""; // Clean Up passed in string values arguments.customizedFinalHtml = TRIM(arguments.customizedFinalHtml); arguments.callback = TRIM(arguments.callback); variables.scripts.loadJQuery(); variables.scripts.loadADFLightbox(); lbResizeWindow(); jQuery(function(){ // Build the FormValues JS Object var #ToScript(arguments.FormValues, "formvalues")# // Set the the FormID as a JS variable var #ToScript(arguments.formid, "formid")# // Set the the DataPageID as a JS variable var #ToScript(arguments.datapageid, "datapageid")# // Call the ADF form callback with the form values data getCallback('#arguments.callback#', formvalues); }); closeLBReloadParent(); closeLB();
Saving, please wait...
// Load the inline JavaScript after the libraries have loaded variables.scripts.addFooterJS(formResultFooterJS, "SECONDARY"); // PRIMARY, SECONDARY, TERTIARY
var dialogFooterJS = ""; variables.scripts.loadJquery(force=1); variables.scripts.loadADFLightbox(force=1); jQuery(function(){ closeLBReloadParent(); }); // Load the inline JavaScript after the libraries have loaded variables.scripts.addFooterJS(dialogFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY