Skip to main content
Participant
October 8, 2010
Question

CFWINDOW

  • October 8, 2010
  • 1 reply
  • 462 views

I have a page set up using a stylesheet and it looks just right.  When I introduce a CFWINDOW, the style on my page starts to fall apart. 

I am calling my window with this code ---->

<img src="imagesLayout/Email_01.png" onclick="javascript:ColdFusion.Window.show('SendToFriendWindow')" />

My window code ----->

<cfwindow

name="SendToFriendWindow"

modal="false"

center="true"

draggable="false"

closable="true"

initshow="false"

height="400"

width="600"

source="SendToFriend.cfm?requestedContent=#requestedContent#"></cfwindow>

It was suggest that I import the CSS file using AJAX. 
I did so using this code: ---->
<cfajaximport cssSrc = "css/style.css">
Now the window uses my stylesheet but the window frame goes away.  Well, I need the window frame to close the window, and for the overall aesthetic appeal.  I have nothing in my stylesheet that I believe would make a CFWINDOW's frame go away.
How do you get CFWINDOW to not interfere with the styles in your web page?

    This topic has been closed for replies.

    1 reply

    Inspiring
    October 9, 2010
    <cfajaximport cssSrc = "css/style.css">

    According to the documenation cssSrc:

         Specifies the URL, relative to the web root, of the directory that contains the CSS

         files used by ColdFusion AJAX features

    So that code will probably override all of the styles for the ajax components.

    I had some success with setting simples styles in the main page. But I know some of the Ajax CSS is a bit totalitarian.  So it is likely you will have wrestle with some of them. You might also do a google search on cfwindows and styles. I know there are a _lot_ of entries on tweaking cfwindows and tips on overriding its styles.

    <!--- main page --->

    <style type="text/css">
    h1    { color: 800080; }
    div.b { background-color: red; font-family: courier new; }
    </style>
    <a href="javascript:ColdFusion.Window.show('SendToFriendWindow')">Show</a>

    <cfwindow ....>

    <!--- SendToFriend page --->

    <h1>Send To Friend</h1>
    <div class="b">Some text here </div>