Leon asked:

"I wondered if you know of a way to control the scroll position of the contents in a cfwindow? Do you know if there's some ext api function or property that can be used sort of like the JS scrollIntoView() type function, but applies to the ext window?"

The solution to the problem can be seen in the cfWindowScrollIntoView() function I created below

(click here to see this code working):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
   <title>CFWindow scrollIntoView()</title>
   <script language="JavaScript">
      cfWindowScrollIntoView = function(windowName,scrollTo){
<form name="MyForm">
<input type="button" value="auto scroll" onclick="cfWindowScrollIntoView('MyWindow','pToScrollTo');">
refreshOnShow = "false"
title="My Test Window"

   click the button to auto scroll to the other section of content in this window
    <p id='pToScrollTo'>Congratulations! you found the other content.</p>

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Leon Chalnick's Gravatar Scott, thanks a bunch! Your efforts are much appreciated. This is working for me but I need to refine it a bit further. As it turns out, what the ext scrollIntoView() does is bring the identified element into view...specifically to the very bottom of the window body. I'd like it to scroll to the top of the window body so it's more easily seen by the end-user.

BTW, I used to run the Southern California CF User Group. I'm glad to see someone else has finally taken up the reins in the OC area. I'll look into your meetings and try to attend one soon.
# Posted By Leon Chalnick | 11/10/08 2:23 PM
Scott Bennett's Gravatar Leon,

change the javascript to be like this:

<script language="JavaScript">
   cfWindowScrollIntoView = function(windowName,scrollTo){
# Posted By Scott Bennett | 11/10/08 4:05 PM
Scott Bennett's Gravatar here is a sample with that new version of the function

# Posted By Scott Bennett | 11/10/08 4:10 PM
Fabiano Magno Pechibella's Gravatar Hi Scott

I have a problem with the ext window and I dont know how I resolve this.

How put a ext window inside a cfform tag?

Called the page window.cfm
<ext:window id="settings" title="..:: Window ::.." width="500" height="200" iconCls="settings" modal="true" resizable="true" closeAction="hide" source="http://localhost:8500/window.cfm">;

How I call the ext window in a cfform tag in the event onSubmit?

This code:
This form post variables to a page.cfc
<cfform action="page.cfc?Method=Package" method="post" name="XMLl" onsubmit="window.open('','pop_up','width=400,height=290,left=250,top=250,screenX=350,screenY=-150');" target="pop_up">

How change the onsubmit=window.open to ext window.

Can you help me?

Hugs from Brazil.
Fabiano Magno Pechibella
# Posted By Fabiano Magno Pechibella | 4/11/13 7:44 PM