Highlighted

cfmessagebox

New Here ,
Jul 03, 2018

Copy link to clipboard

Copied

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.

Thank you

Adobe Community Professional
Correct answer by Charlie Arehart | Adobe Community Professional

Ok, but I was neither saying nor implying the contrary.

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

cfmessagebox

New Here ,
Jul 03, 2018

Copy link to clipboard

Copied

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.

Thank you

Adobe Community Professional
Correct answer by Charlie Arehart | Adobe Community Professional

Ok, but I was neither saying nor implying the contrary.

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 03, 2018 0
LEGEND ,
Jul 03, 2018

Copy link to clipboard

Copied

Your best bet is to learn CSS, JavaScript, and use something like Bootstrap or W3 css for your modal needs.

There is another thread in here about how the underlying JavaScript that ships with CF is old, outdated, not compliant with modern day browsers, and someone else pointed out that the latest version of CF removed the yui library (more JS).

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.

V/r,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 03, 2018 0
New Here ,
Jul 03, 2018

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 03, 2018 0
LEGEND ,
Jul 03, 2018

Copy link to clipboard

Copied

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.

According to this Adobe page, CFMESSAGEBOX wasn't introduced until CF9.  So, your only route, now, is to use Bootstrap and JavaScript. 

V/r,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 03, 2018 0
LEGEND ,
Jul 03, 2018

Copy link to clipboard

Copied

Op.. I just realized what you actually meant.  But that is even more reason why you should upgrade to at least CF10 (better security) and use JavaScript, CSS, and Bootstrap.  Your HTML that is generated by CF for the UI is outdated, deprecated, and will soon be breaking.

V/r,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 03, 2018 0
Most Valuable Participant ,
Jul 10, 2018

Copy link to clipboard

Copied

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).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2018 0
New Here ,
Jul 10, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2018 0
Most Valuable Participant ,
Jul 10, 2018

Copy link to clipboard

Copied

it's just the editor that is version 5

What editor are you using?  Although that probably isn't totally germane to this discussion.

There is a difference between a pop-up and a modal dialog.  A pop-up is another browser window.  There are JavaScript techniques to open a pop-up with most of the browser's chrome hidden.  But it's possible you won't be able to hide the Address bar (maybe only make it read-only) - that may vary based on how each browser implements those features.  It sounds like this is what you are working with (as indicated by "window.open").

A modal dialog is a construct that "overlays" the web page inside the same browser window.  Being "modal" means it blocks interaction with the rest of the page until the dialog is closed.  Modal dialogs are usually produced using JavaScript/CSS frameworks or plugins (like Bootstrap or jQuery UI). 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2018 0
New Here ,
Jul 10, 2018

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2018 0
New Here ,
Jul 10, 2018

Copy link to clipboard

Copied

with cfmessagebox jMobtain an error he does not recognize

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2018 0
Most Valuable Participant ,
Jul 10, 2018

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2018 0
New Here ,
Jul 11, 2018

Copy link to clipboard

Copied

Hello, my modal window is the same everywhere because I pass the data to write in parameter with javascript. how do i make a shared file in cold fusion? and that I can integrate it to all my pages?

thank you very much

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 0
Most Valuable Participant ,
Jul 11, 2018

Copy link to clipboard

Copied

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

<cfinclude template="myAwesomeModal.cfm">

somewhere in it.

You'll have to look into the docs for whichever modal UI library you choose to use for how to pass the data to it via JavaScript.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 0
New Here ,
Jul 11, 2018

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 0
Most Valuable Participant ,
Jul 11, 2018

Copy link to clipboard

Copied

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).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 0
New Here ,
Jul 11, 2018

Copy link to clipboard

Copied

Okay ! thank you for everything

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 0
Adobe Community Professional ,
Jul 11, 2018

Copy link to clipboard

Copied

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.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 1
Adobe Community Professional ,
Jul 11, 2018

Copy link to clipboard

Copied

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.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 0
Most Valuable Participant ,
Jul 11, 2018

Copy link to clipboard

Copied

Charlie,

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 0
Adobe Community Professional ,
Jul 11, 2018

Copy link to clipboard

Copied

Ok, but I was neither saying nor implying the contrary.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 11, 2018 0
New Here ,
Aug 31, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 31, 2018 0