• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Probleme de #

Contributor ,
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

548

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

Votes

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,

^ _ ^

Votes

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
Contributor ,
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

Votes

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,

^ _ ^

Votes

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
Community Expert ,
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")>

Votes

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
Contributor ,
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

Votes

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
Community Expert ,
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.

Votes

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
Resources
Documentation