Hello, I would like to know if cfmessagebox works with version 5 of coldfusion, otherwise how to display a window with an error message in a modal window. several new browsers so Edge does not allow the display of a window without the address bar.
Seriously, using something like Bootstrap for modals is not as difficult to learn as you might think. And, you'll learn something that can be used on any project.
^ _ ^
Hello, first of all, thank you very much for your quick response. The problem with this solutuin is that my version of coldFusion is old and uses html4. As soon as I add something to the page the system does not run anymore.
CF5 does not use HTML4. The programmer who developed the app/site used HTML4. Browsers that have been out for the last year or so are HTML5 capable. HTML doesn't have any affect on CF because CF is server-side and HTML is client-side.
^ _ ^
^ _ ^
Just to add to WolfShade comment - if you are upgrading you should go straight to CF 2016. CF10 is no longer under support, and CF11 will drop off of support when CF2018 is released (currently in beta, likely will be released as final later this year).
And definitely look into Bootstrap or another HTML5/JS/CSS front-end library to do modals (even jQuery UI would be better than using any of built-in UI stuff in ColdFusion).
hello, thank you for your answer, I check and we are with version 11, it's just the editor that is version 5. the problem I have is that all the validation messages and error of the system is done with wondow.open, with internet explorer it works but my job is to make the application compatible with edge, but the pop up is not displayed modal and the address bar remains present and is impossible to remove. all pages are made with frameset and nested frame. I work for the government so I do not have a decision to make for the version. I do not know how to make my messages, I did tests with jquery and bootstrap but I have about 600 pages in the system, I wonder if I should add the modal on each pages. Excuse me for the questions but I do not know much about coldfusion and the frame. i have always worked with php, html, jquery, css laravel, wordpress but not coldfusion.
thank you so much
it's just the editor that is version 5
What editor are you using? Although that probably isn't totally germane to this discussion.
that's what i need modal, but to do this with jquery or other, it must be put on the page displayed with a display: none until the time to call it. when i was working with PHP i was doing include for what i wanted to show on my pages, but with coldfusion, i do not know how to proceed without repeating this modal window on all my pages. I have no less than 600. Or have you already seen the bug of pop up with edge?
with cfmessagebox jMobtain an error he does not recognize
I haven't used pop-ups in quite a long time, so I've never tested it on Edge.
With regard to modal dialogs - you can do an include in ColdFusion (see the <CFINCLUDE> tag), and put the modal content into a shared file. However, are the modal dialogs the same on all 600 or so pages?
thank you very much
Any .cfm file can be "shared" by including it in other .cfm files using the <cfinclude> tag: https://cfdocs.org/cfinclude
So every page that needed the "shared" modal .cfm file would have a
somewhere in it.
Hello, is there a place where I can put cfinclude to be included on all my pages? otherwise it must be integrated on all pages?
It depends. Are you using Application.cfc or Application.cfm?
If you are using Application.cfc, you can add the <cfinclude> tag to the onRequest() function and that will load it on every page.
If you are using Application.cfm, you might be able to achieve this too. However, I couldn't tell you how (I haven't used Application.cfm in so long I don't remember anything about it).
Okay ! thank you for everything
Following on to Carl's discussion of cfinclude in application.cfc or cfm, actually Carl what you may be thinking of (about onrequest) is that in fact one MUST do a cfinclude there. That method acts as a front controller, and unless the code says where to go next, it would not run the page that triggered the method.
But in the case of onrequeststart, that works just like application.cfm, at least in the sense that it's simply some code that is implicitly called before the request of any CFM page (under its control).
And so to Anickb's question (and your wondering), yes, you could do a cfinclude in an application.cfm or the onrequeststart method, to have some code that should run before every page.
That said, it's not always wise to do some operations "on every page", as I'm sure you would note as well, Carl. But Anick, if that helps you (or may help future readers of this thread), great.
Thank you for the clarification on the support dates.
As to the onRequest() vs. onRequestStart(), you are correct that you must have a <cfinclude> in the onRequest() method to actually load the page requested like so:
<cfinclude template="#ARGUMENTS.TargetPage#" />
However, nothing prevents one from putting additional <cfinclude> tags either before or after the one that calls the TargetPage. I have an application that has run for more than 10 years that had two or three additional <cfinclude> tags in it to load some common "chrome" to the site. Should those have been in onRequestStart() instead?
Ok, but I was neither saying nor implying the contrary.
Hello, I solved the problem by adding a modal page to display my error messages, for cons I just discovered that several pages of the application are managed with 3 frameset and more each refer to different URLs. the modal page is inserted on each one of her so when it is displayed in the top part it remains trapped in the frame that makes it display, the second is the same etc .... that one to an idea to counter this problem? more modal page just disables the portion of my page that contain the frame that has displayed my modal.
thank you very much
Carl, you said earlier in the thread that "CF11 will drop off of support when CF2018 is released". Actually, it will drop in 2019.
The support dates are publicized here: https://helpx.adobe.com/support/programs/eol-matrix.html (and actually, extended support for CF11 continues to 2021).
That said, I am not discouraging people moving to 2016, nor your encouraging them to do so. 🙂 Just wanted to clarify that date since you mentioned it.