Skip to main content
Known Participant
Sep 30, 2014 12:37 AM UTC
Answered

CFwindow not working with secure URL

I use the code

    <cfajaximport tags="cfform, cfmessagebox, cfwindow">
   <cfwindow bodystyle="background:white;font:12px/normal arial, Helvetica, sans-serif;" initShow="true" width="350" height="255" name="signin" center="true" resizable="false" draggable="false" source="login.htm"/>

and it is working fine.  The sign in window appears.  However, I want to change it to a secured URL by entering the full URL

    <cfajaximport tags="cfform, cfmessagebox, cfwindow">
   <cfwindow bodystyle="background:white;font:12px/normal arial, Helvetica, sans-serif;" initShow="true" width="350" height="255" name="signin" enter="true" resizable="false" draggable="false" source="https://mydomain/login.htm"/>

The pop up cfwindows shows blank.  Why is that?  Any help is appreciated.

This topic is closed to new replies. Start a new post to keep the conversation going.
Carl Von Stetten
Carl Von StettenCorrect answer
Legend
Sep 30, 2014 10:31 PM UTC

Because that is considered a cross-domain request (although it seems to be only cross-protocol, in reality an http address can resolve to a different virtual host from an https address).  Take a look a this StackOverflow thread for some suggested workarounds.

Also, this is probably easier to deal with using **anything** other than CFWindow, as Scott suggests.

26 replies

Carl Von Stetten
Legend
Oct 3, 2014 4:23 PM UTC

jackhuang,

I don't really have anything else to offer, other than "don't use <cfwindow>".

Translate
Participating Frequently
Sep 30, 2014 9:03 PM UTC

What happens when you go to the URL directly in a browser window rather than from CFWINDOW?

Translate
jackhuangAuthor
Known Participant
Sep 30, 2014 9:16 PM UTC

It works normally with https prefix.  It's just a simple sign in form.

Translate
Carl Von Stetten
Carl Von StettenCorrect answer
Legend
Sep 30, 2014 10:31 PM UTC

Because that is considered a cross-domain request (although it seems to be only cross-protocol, in reality an http address can resolve to a different virtual host from an https address).  Take a look a this StackOverflow thread for some suggested workarounds.

Also, this is probably easier to deal with using **anything** other than CFWindow, as Scott suggests.

Translate
Participating Frequently
Sep 30, 2014 7:25 PM UTC

Because CFWindow.

Translate
BKBK
Community Expert
Community Expert
Sep 30, 2014 6:46 PM UTC

Why don't you rename the page to .cfm? Coldfusion does not process HTML pages.

Translate
jackhuangAuthor
Known Participant
Sep 30, 2014 7:09 PM UTC

I made CF process .htm as well.  I read somewhere that it's best to hide from public what technology you are using.

Translate
BKBK
Community Expert
Community Expert
Oct 1, 2014 7:58 AM UTC

jackhuang wrote:

I made CF process .htm as well.

No, you cannot. Again, Jackhuang, you see a blank page because Coldfusion does not process the CFML code on the HTML page. I am assuming here that you are using the default Coldfusion extensions CFM, CFML, CFC, etc.

Then the web server does not send HTML files to Coldfusion for processing. It simply sends them as text to the browser. You are seeing nothing because browsers don't display tags. However, you will see the text if you open the URL in a browser and view the source.

Oh, and I agree with Scott and Carl that you should avoid Coldfusion UI tags like cfwindow. You could use simple ol' Javascript.

Translate
Carl Von Stetten
Legend
Sep 30, 2014 3:14 PM UTC

Is the main page the CFWindows is part of also on HTTPS?

Translate
jackhuangAuthor
Known Participant
Sep 30, 2014 5:18 PM UTC

The page that calls the secured login page is not on https.

Translate