Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
jackhuang wrote:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.mydomain.com/login.htm?_cf_containerId=signmein_body&_cf_nodebug=true&_cf_noca che=true&.... This can be fixed by moving the resource to the same domain or enabling CORS.
Whatever else is the issue, Coldfusion adds the query-string, _cf_containerId=signmein_body&_cf_nodebug=true&_cf_nocache=true&_cf_rc=0. What if the site https://www.mydomain.com/login.htm expects no URL parameters? You should therefore report this as a bug.
Copy link to clipboard
Copied
jackhuang,
I don't really have anything else to offer, other than "don't use <cfwindow>".