Probleme de #

Participant ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

Hello


I do not understand why the following phrase is good:


<CFFORM action="../../Admin/_modules/inc_Modale.cfm?fen=Pop.LoginEntry.cfm&PageUrl=#PageUrl###oModal" method="post">


and the next one does not pass:

<CFINCLUDE template="../../Admin/_modules/inc_Modale.cfm?fen=Pop.cookies.cfm##oModal">

thank you in advance for your help

Views

349

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
community guidelines
Advocate ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

The cfInclude tag's parameter is a reference to a file on disk, but you are providing a URL with URL parameters.

Try:

<CFINCLUDE template="../../Admin/_modules/inc_Modale.cfm">

Cheers

Eddie

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
community guidelines
LEGEND ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

As per EddieLotter​'s suggestion, should you need to pass a value to the template, you can set a variable with that value (prior to the cfinclude) and then reference the variable within the template.

HTH,

^ _ ^

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
community guidelines
Participant ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

Thank you for your answers.

I suspected that it came from there 😉
But for the window to be modal I need to pass "#oModal"
and do not know how to do it!

Thanks

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
community guidelines
LEGEND ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

Unfortunately, I do not have an answer for that.  I have never used fragments (#oModal, for example) to activate modal windows.  Perhaps you could set a variable called oModal to either true or false, and inside the CFINCLUDE template, use that as a conditional to display the page in modal or not?

HTH,

^ _ ^

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
community guidelines
Adobe Community Professional ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

ZNB  wrote

Hello


I do not understand why the following phrase is good:


<CFFORM action="../../Admin/_modules/inc_Modale.cfm?fen=Pop.LoginEntry.cfm&PageUrl=#PageUrl###oMo dal" method="post">


and the next one does not pass:

<CFINCLUDE template="../../Admin/_modules/inc_Modale.cfm?fen=Pop.cookies.cfm##oModal">

The reason for the difference is page context. The first case passes because the context of the page for the URL variables is the action page, not the current (form) page.

Whereas, the context of the cfinclude is the current page. As EddieLotter says, ColdFusion then expects the value of the template attribute to be a file-path relative to the current page. However, in this case, the appended URL variables aren't part of the file-path. Hence the error.

To "include" the context of the new page into the current page, you could do something like

<cfset getPageContext().include("../../Admin/_modules/inc_Modale.cfm?fen=Pop.cookies.cfm##oModal")>

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
community guidelines
Participant ,
Oct 19, 2017 Oct 19, 2017

Copy link to clipboard

Copied

Hello,
I was inspired by this article:
http://www.trucsweb.com/tutoriels/css/css-modal/#fermer
to make the windows.

Thanks

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
community guidelines
Adobe Community Professional ,
Oct 19, 2017 Oct 19, 2017

Copy link to clipboard

Copied

LATEST

Thanks for sharing your discovery. Please mark it as the correct answer. It will help someone else in future.

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
community guidelines