RE: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Andrew Scott
Ok if you dynamically create them, then why not store the windownames into
an array. Then loop over the array to see if it is there, then when removing
the window remove it from the array?

But if that is too much work see another post of mine.


Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273



-Original Message-
From: Dustin Snell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 20 December 2007 8:41 AM
To: CF-Talk
Subject: Re: Multple CFWINDOWS - cannot identify - 2nd try

I do dynamically create them so that if the user doesn't have the windows
open they don't take up page-load time. ColdFusion could choose to make us
do the same thing for all of our variables, but for ease we have
IsDefined(). I think Adobe should add this type of functionality to CF for
Window management. The should also add native support for all the other
events (onmove, onresize, etc.) - currently they only support a few basic
ones. They aren't making it very easy to work with the CFWINDOWs right now.
Making them is easy, managing them is another story.


>Every window will exist, whether it is hidden or not.
>
>The only time a window will not exist, is when you dynamically create
>it. But that is easy to achieve, by keeping a list of window names in
>an array.




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295155
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Andrew Scott
Dustin,

I do not mean to be rude, but if you use firebug to inspect the div elements
that are created by CFWindow. The normal getElemenyByID('WindowName'), will
return null if it is not defined.

Also you never said if you are doing this dynamically, in other words you
are using JS to create the windows when needed. The reason I said this
before is because as soon as you do  the div element for the
window is created and is in the dom, to be referenced.

I think you should read my posts a little more carefully.

Also you could refactor your code to something like this.

Function Test() {
handleCFWindow('Window1');
handleCFWindow('Window2');
}

handleCFWindow(/* String */ WindowName)
{
If(document.getElementById(WindowName) {
var w = ColdFusion.Window.getWindowObject(WindowName);
w.on('move',setCoordsTODAYAT,w);
w.on('hide',closeWindowTODAYAT,w);   
}
}


But like I stated above if cfwindow is used on a page, then that div element
will be there anyway.


Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273


-Original Message-
From: Dustin Snell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 20 December 2007 6:10 AM
To: CF-Talk
Subject: Re: Multple CFWINDOWS - cannot identify - 2nd try

For anyone else who wants to do this, I got it working finally. But it
required the use of a try catch block to ignore the exception caused when
you try to ColdFusion.Window.getWindowObject(x) on a window that may or may
not exist. I was unable to find an elegant method to check if a window
exists by name. Also, I had to create a dedicated event-handler for each
window, because if they all fire the same event, no identifiable information
seems to be be passed with the window (most notably, the name).

So the code (which is invoked via AjaxOnLoad()) is clunky, but works and
looks like this:

moveListener = function() 
  {

  if (ColdFusion.Window != null)
  { 
  try {
  var w =
ColdFusion.Window.getWindowObject('todayAtWindow');
w.on('move',setCoordsTODAYAT,w);
w.on('hide',closeWindowTODAYAT,w);   
} catch (e) {
// ignore it
}

try {
var w = ColdFusion.Window.getWindowObject('searcher');
w.on('move',setCoordsSEARCHER,w);
w.on('hide',closeWindowSEARCHER,w);
} catch (e) {
// ignore it
}
  }
  }
  
setCoordsTODAYAT = function(ob,x,y) 
{ 
Set_Cookie('TODAYATWINDOW_X', x, 10, '/', '', '');
Set_Cookie('TODAYATWINDOW_Y', y, 10, '/', '', '');
}

closeWindowTODAYAT = function(ob) 
{ 
Set_Cookie('TODAYATWINDOW_SHOW', false, 10, '/', '', '');
}

setCoordsSEARCHER = function(ob,x,y) 
{ 
Set_Cookie('SEARCHERWINDOW_X', x, 10, '/', '', '');
Set_Cookie('SEARCHERWINDOW_Y', y, 10, '/', '', '');
}

closeWindowSEARCHER = function(ob) 
{ 
Set_Cookie('SEARCHERWINDOW_SHOW', false, 10, '/', '', '');
}




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295154
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Dustin Snell
I do dynamically create them so that if the user doesn't have the windows open 
they don't take up page-load time. ColdFusion could choose to make us do the 
same thing for all of our variables, but for ease we have IsDefined(). I think 
Adobe should add this type of functionality to CF for Window management. The 
should also add native support for all the other events (onmove, onresize, 
etc.) - currently they only support a few basic ones. They aren't making it 
very easy to work with the CFWINDOWs right now. Making them is easy, managing 
them is another story.


>Every window will exist, whether it is hidden or not.
>
>The only time a window will not exist, is when you dynamically create
>it. But that is easy to achieve, by keeping a list of window names in
>an array.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295141
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Andrew Scott
Every window will exist, whether it is hidden or not.

The only time a window will not exist, is when you dynamically create
it. But that is easy to achieve, by keeping a list of window names in
an array.



On 12/20/07, Dustin M. Snell <[EMAIL PROTECTED]> wrote:
> Thanks for your reply. Ok I have Firebug. I see quite a lot of properties
> and methods. After checking the whole tree I do not see a way to get all the
> Windows that are open or a way to check if a certain Window Exists by name
> or any other identifying characteristic that would persist from page to
> page. Therefore I cannot save the position of multiple windows reliably,
> because I am only able to check if there are Windows (in general) open or
> not, there seems to be no ability to test in JavaScript for a certain Window
> being open. (ID is uniquely generated on each page load so that won't work
> either).
>
> Am I looking more or less silly at this point?
>
> -Original Message-
> From: Andrew Scott [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 19, 2007 9:03 AM
> To: CF-Talk
> Subject: Re: Multple CFWINDOWS - cannot identify - 2nd try
>
> Ok,
>
>
> Here is what you need to do.
>
> 1) D'load Firefox
> 2) Get the plugin / addon calle fireBug
> 3) Use that to view properties and methods of an object
>
>
> For example, in the fireBug window.
>
> >>> Coldfusion
>
> Will dump the object to the console, for you to browse and inspect.
>
> HTH
>
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295140
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Dustin Snell
For anyone else who wants to do this, I got it working finally. But it required 
the use of a try catch block to ignore the exception caused when you try to 
ColdFusion.Window.getWindowObject(x) on a window that may or may not exist. I 
was unable to find an elegant method to check if a window exists by name. Also, 
I had to create a dedicated event-handler for each window, because if they all 
fire the same event, no identifiable information seems to be be passed with the 
window (most notably, the name).

So the code (which is invoked via AjaxOnLoad()) is clunky, but works and looks 
like this:

moveListener = function() 
  {

  if (ColdFusion.Window != null)
  { 
  try {
  var w = ColdFusion.Window.getWindowObject('todayAtWindow');
w.on('move',setCoordsTODAYAT,w);
w.on('hide',closeWindowTODAYAT,w);   
} catch (e) {
// ignore it
}

try {
var w = ColdFusion.Window.getWindowObject('searcher');
w.on('move',setCoordsSEARCHER,w);
w.on('hide',closeWindowSEARCHER,w);
} catch (e) {
// ignore it
}
  }
  }
  
setCoordsTODAYAT = function(ob,x,y) 
{ 
Set_Cookie('TODAYATWINDOW_X', x, 10, '/', '', '');
Set_Cookie('TODAYATWINDOW_Y', y, 10, '/', '', '');
}

closeWindowTODAYAT = function(ob) 
{ 
Set_Cookie('TODAYATWINDOW_SHOW', false, 10, '/', '', '');
}

setCoordsSEARCHER = function(ob,x,y) 
{ 
Set_Cookie('SEARCHERWINDOW_X', x, 10, '/', '', '');
Set_Cookie('SEARCHERWINDOW_Y', y, 10, '/', '', '');
}

closeWindowSEARCHER = function(ob) 
{ 
Set_Cookie('SEARCHERWINDOW_SHOW', false, 10, '/', '', '');
}


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295122
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Dustin M. Snell
Thanks for your reply. Ok I have Firebug. I see quite a lot of properties
and methods. After checking the whole tree I do not see a way to get all the
Windows that are open or a way to check if a certain Window Exists by name
or any other identifying characteristic that would persist from page to
page. Therefore I cannot save the position of multiple windows reliably,
because I am only able to check if there are Windows (in general) open or
not, there seems to be no ability to test in JavaScript for a certain Window
being open. (ID is uniquely generated on each page load so that won't work
either).

Am I looking more or less silly at this point?

-Original Message-
From: Andrew Scott [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 9:03 AM
To: CF-Talk
Subject: Re: Multple CFWINDOWS - cannot identify - 2nd try

Ok,


Here is what you need to do.

1) D'load Firefox
2) Get the plugin / addon calle fireBug
3) Use that to view properties and methods of an object


For example, in the fireBug window.

>>> Coldfusion

Will dump the object to the console, for you to browse and inspect.

HTH




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295108
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Andrew Scott
Also as I said you answer is in the code.


var w = ColdFusion.Window.getWindowObject('WindowName1');
w.on('move',setCoordsTODAYAT,w);
w.on('hide',closeWindowTODAYAT,w);

var w1 = ColdFusion.Window.getWindowObject('WindowName2');
w1.on('move',setCoordsTODAYAT,w1);
w1.on('hide',closeWindowTODAYAT,w1);


On 12/20/07, Dustin M. Snell <[EMAIL PROTECTED]> wrote:
> Sorry if I seem silly or not to be thinking straight.
>
> Although I do have a programming background, I am rather new to Javascript
> and AJAX techniques. The function naming is the result of an attempt at
> solving the problem -but it didn't work.  Ideally all the CFWINDOWs would
> all go through a *single* event handler and the name of the window could be
> retrieved via the object. This doesn't seem possible from what I have seem
> so far. "ob.name" gives you nothing. So next, I decided to do separate event
> handlers for each object. Unfortunately there is no way via pure javascript
> to see which windows by name happen to be open or not. So you will get an
> error when you try to getWindowObject on a window that might not be open. I
> suppose I could use CF to conditionally generate javascript code, but I do
> wish I could just query this all via Javascript.
>
> Again, a single event handler with access to the name of the window would be
> ideal - I am amazed that this isn't possible. When working with windows it
> seems to me the ability to say DoesWindowExist() and get Window.name()
> should be part of the basic functionality. Of course, I could still be
> missing something.
>
> -Dustin
> -Original Message-
> From: Andrew Scott [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 19, 2007 8:26 AM
> To: CF-Talk
> Subject: Re: Multple CFWINDOWS - cannot identify - 2nd try
>
> I must admit, either your not thinking straight or you are plan being silly.
>
> The answer is in your code, every window has a name. So why not do
> what you have done with the next window name?
>
> Personally, I would send an event back to the server when the mouse up
> event is fired and save that winodws coords in the db against that
> user window. That way cokkies can be switched off / deleted and still
> have that persistance feel.
>
>
> On 12/20/07, Dustin M. Snell <[EMAIL PROTECTED]> wrote:
> > Since I didn't get any replies to this, perhaps I can rephrase the
> question.
> > Does anyone know of *any* way. To store the last position of *multiple*
> open
> > CFWINDOW objects. All examples I have found only work with one window.
> >
> > -Original Message-
> > From: Dustin M. Snell [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 18, 2007 4:17 PM
> > To: CF-Talk
> > Subject: Multple CFWINDOWS - cannot identify
> >
> > Hello, I am trying to move our Intranet app to use CFWINDOWs. One of the
> > things I would like to do is migrate over time. This being the case, I
> want
> > to make a routine that saves the X and Y coordinates of a window to a
> > cookie, so that on the next page load the CFWINDOW is created in the same
> > position it was at. This gives the impression to the user that the Windows
> > are "persistant". I have this successfully working with ONE window.
> >
> >
> >
> > I run into problems with more than one window because there seems to be no
> > way to check for the existence of a certain window by name, or to extract
> > the name of whatever window passed the move event. I am running into is
> that
> > I need to get the name of the Window (or some other identifying
> > characteristic) so that I know which cookie to write to. Unfortunately
> NAME
> > does not seem to be exposed. Here is my JavaScript code (called via
> > AJAXOnLoad):
> >
> >
> >
> > moveListener = function()
> >
> >  {
> >
> >  if (ColdFusion.Window != null)
> >
> >  {
> >
> >  var w =
> > ColdFusion.Window.getWindowObject('todayAtWindow');
> >
> >
> > w.on('move',setCoordsTODAYAT,w);
> >
> >
> > w.on('hide',closeWindowTODAYAT,w);
> >
> >
> >
> >
> >
> >  }
> >
> >
> >
> > setCoordsTODAYAT = function(ob,x,y)
> >
> > {
> >
> >
> >
> >Set_Cookie('TODAYATWINDOW_X', x, 10, '/', '', '');
> >
> >Set_Cookie('TODAYATWINDOW_Y', y, 10, '/', '', '');
> >
> > }
> >
> >
> >
> > closeWindowTODAYAT = function(ob)
> >
> > {
> >
> >Set_Cookie('TODAYATWINDOW_SHOW', false, 10, '/', '', '');
> >
> > }
> >
> >
> >
> > Any help would be appreciated.
> >
> >
> >
> >
> >
> >
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295107
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Andrew Scott
Ok,


Here is what you need to do.

1) D'load Firefox
2) Get the plugin / addon calle fireBug
3) Use that to view properties and methods of an object


For example, in the fireBug window.

>>> Coldfusion

Will dump the object to the console, for you to browse and inspect.

HTH



On 12/20/07, Dustin M. Snell <[EMAIL PROTECTED]> wrote:
> Sorry if I seem silly or not to be thinking straight.
>
> Although I do have a programming background, I am rather new to Javascript
> and AJAX techniques. The function naming is the result of an attempt at
> solving the problem -but it didn't work.  Ideally all the CFWINDOWs would
> all go through a *single* event handler and the name of the window could be
> retrieved via the object. This doesn't seem possible from what I have seem
> so far. "ob.name" gives you nothing. So next, I decided to do separate event
> handlers for each object. Unfortunately there is no way via pure javascript
> to see which windows by name happen to be open or not. So you will get an
> error when you try to getWindowObject on a window that might not be open. I
> suppose I could use CF to conditionally generate javascript code, but I do
> wish I could just query this all via Javascript.
>
> Again, a single event handler with access to the name of the window would be
> ideal - I am amazed that this isn't possible. When working with windows it
> seems to me the ability to say DoesWindowExist() and get Window.name()
> should be part of the basic functionality. Of course, I could still be
> missing something.
>
> -Dustin
> -Original Message-
> From: Andrew Scott [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 19, 2007 8:26 AM
> To: CF-Talk
> Subject: Re: Multple CFWINDOWS - cannot identify - 2nd try
>
> I must admit, either your not thinking straight or you are plan being silly.
>
> The answer is in your code, every window has a name. So why not do
> what you have done with the next window name?
>
> Personally, I would send an event back to the server when the mouse up
> event is fired and save that winodws coords in the db against that
> user window. That way cokkies can be switched off / deleted and still
> have that persistance feel.
>
>
> On 12/20/07, Dustin M. Snell <[EMAIL PROTECTED]> wrote:
> > Since I didn't get any replies to this, perhaps I can rephrase the
> question.
> > Does anyone know of *any* way. To store the last position of *multiple*
> open
> > CFWINDOW objects. All examples I have found only work with one window.
> >
> > -Original Message-
> > From: Dustin M. Snell [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 18, 2007 4:17 PM
> > To: CF-Talk
> > Subject: Multple CFWINDOWS - cannot identify
> >
> > Hello, I am trying to move our Intranet app to use CFWINDOWs. One of the
> > things I would like to do is migrate over time. This being the case, I
> want
> > to make a routine that saves the X and Y coordinates of a window to a
> > cookie, so that on the next page load the CFWINDOW is created in the same
> > position it was at. This gives the impression to the user that the Windows
> > are "persistant". I have this successfully working with ONE window.
> >
> >
> >
> > I run into problems with more than one window because there seems to be no
> > way to check for the existence of a certain window by name, or to extract
> > the name of whatever window passed the move event. I am running into is
> that
> > I need to get the name of the Window (or some other identifying
> > characteristic) so that I know which cookie to write to. Unfortunately
> NAME
> > does not seem to be exposed. Here is my JavaScript code (called via
> > AJAXOnLoad):
> >
> >
> >
> > moveListener = function()
> >
> >  {
> >
> >  if (ColdFusion.Window != null)
> >
> >  {
> >
> >  var w =
> > ColdFusion.Window.getWindowObject('todayAtWindow');
> >
> >
> > w.on('move',setCoordsTODAYAT,w);
> >
> >
> > w.on('hide',closeWindowTODAYAT,w);
> >
> >
> >
> >
> >
> >  }
> >
> >
> >
> > setCoordsTODAYAT = function(ob,x,y)
> >
> > {
> >
> >
> >
> >Set_Cookie('TODAYATWINDOW_X', x, 10, '/', '', '');
> >
> >Set_Cookie('TODAYATWINDOW_Y', y, 10, '/', '', '');
> >
> > }
> >
> >
> >
> > closeWindowTODAYAT = function(ob)
> >
> > {
> >
> >Set_Cookie('TODAYATWINDOW_SHOW', false, 10, '/', '', '');
> >
> > }
> >
> >
> >
> > Any help would be appreciated.
> >
> >
> >
> >
> >
> >
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295104
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Dustin M. Snell
Sorry if I seem silly or not to be thinking straight. 

Although I do have a programming background, I am rather new to Javascript
and AJAX techniques. The function naming is the result of an attempt at
solving the problem -but it didn't work.  Ideally all the CFWINDOWs would
all go through a *single* event handler and the name of the window could be
retrieved via the object. This doesn't seem possible from what I have seem
so far. "ob.name" gives you nothing. So next, I decided to do separate event
handlers for each object. Unfortunately there is no way via pure javascript
to see which windows by name happen to be open or not. So you will get an
error when you try to getWindowObject on a window that might not be open. I
suppose I could use CF to conditionally generate javascript code, but I do
wish I could just query this all via Javascript. 

Again, a single event handler with access to the name of the window would be
ideal - I am amazed that this isn't possible. When working with windows it
seems to me the ability to say DoesWindowExist() and get Window.name()
should be part of the basic functionality. Of course, I could still be
missing something.

-Dustin
-Original Message-
From: Andrew Scott [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 8:26 AM
To: CF-Talk
Subject: Re: Multple CFWINDOWS - cannot identify - 2nd try

I must admit, either your not thinking straight or you are plan being silly.

The answer is in your code, every window has a name. So why not do
what you have done with the next window name?

Personally, I would send an event back to the server when the mouse up
event is fired and save that winodws coords in the db against that
user window. That way cokkies can be switched off / deleted and still
have that persistance feel.


On 12/20/07, Dustin M. Snell <[EMAIL PROTECTED]> wrote:
> Since I didn't get any replies to this, perhaps I can rephrase the
question.
> Does anyone know of *any* way. To store the last position of *multiple*
open
> CFWINDOW objects. All examples I have found only work with one window.
>
> -Original Message-
> From: Dustin M. Snell [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 18, 2007 4:17 PM
> To: CF-Talk
> Subject: Multple CFWINDOWS - cannot identify
>
> Hello, I am trying to move our Intranet app to use CFWINDOWs. One of the
> things I would like to do is migrate over time. This being the case, I
want
> to make a routine that saves the X and Y coordinates of a window to a
> cookie, so that on the next page load the CFWINDOW is created in the same
> position it was at. This gives the impression to the user that the Windows
> are "persistant". I have this successfully working with ONE window.
>
>
>
> I run into problems with more than one window because there seems to be no
> way to check for the existence of a certain window by name, or to extract
> the name of whatever window passed the move event. I am running into is
that
> I need to get the name of the Window (or some other identifying
> characteristic) so that I know which cookie to write to. Unfortunately
NAME
> does not seem to be exposed. Here is my JavaScript code (called via
> AJAXOnLoad):
>
>
>
> moveListener = function()
>
>  {
>
>  if (ColdFusion.Window != null)
>
>  {
>
>  var w =
> ColdFusion.Window.getWindowObject('todayAtWindow');
>
>
> w.on('move',setCoordsTODAYAT,w);
>
>
> w.on('hide',closeWindowTODAYAT,w);
>
>
>
>
>
>  }
>
>
>
> setCoordsTODAYAT = function(ob,x,y)
>
> {
>
>
>
>Set_Cookie('TODAYATWINDOW_X', x, 10, '/', '', '');
>
>Set_Cookie('TODAYATWINDOW_Y', y, 10, '/', '', '');
>
> }
>
>
>
> closeWindowTODAYAT = function(ob)
>
> {
>
>Set_Cookie('TODAYATWINDOW_SHOW', false, 10, '/', '', '');
>
> }
>
>
>
> Any help would be appreciated.
>
>
>
>
>
> 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295103
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Andrew Scott
I must admit, either your not thinking straight or you are plan being silly.

The answer is in your code, every window has a name. So why not do
what you have done with the next window name?

Personally, I would send an event back to the server when the mouse up
event is fired and save that winodws coords in the db against that
user window. That way cokkies can be switched off / deleted and still
have that persistance feel.


On 12/20/07, Dustin M. Snell <[EMAIL PROTECTED]> wrote:
> Since I didn't get any replies to this, perhaps I can rephrase the question.
> Does anyone know of *any* way. To store the last position of *multiple* open
> CFWINDOW objects. All examples I have found only work with one window.
>
> -Original Message-
> From: Dustin M. Snell [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 18, 2007 4:17 PM
> To: CF-Talk
> Subject: Multple CFWINDOWS - cannot identify
>
> Hello, I am trying to move our Intranet app to use CFWINDOWs. One of the
> things I would like to do is migrate over time. This being the case, I want
> to make a routine that saves the X and Y coordinates of a window to a
> cookie, so that on the next page load the CFWINDOW is created in the same
> position it was at. This gives the impression to the user that the Windows
> are "persistant". I have this successfully working with ONE window.
>
>
>
> I run into problems with more than one window because there seems to be no
> way to check for the existence of a certain window by name, or to extract
> the name of whatever window passed the move event. I am running into is that
> I need to get the name of the Window (or some other identifying
> characteristic) so that I know which cookie to write to. Unfortunately NAME
> does not seem to be exposed. Here is my JavaScript code (called via
> AJAXOnLoad):
>
>
>
> moveListener = function()
>
>  {
>
>  if (ColdFusion.Window != null)
>
>  {
>
>  var w =
> ColdFusion.Window.getWindowObject('todayAtWindow');
>
>
> w.on('move',setCoordsTODAYAT,w);
>
>
> w.on('hide',closeWindowTODAYAT,w);
>
>
>
>
>
>  }
>
>
>
> setCoordsTODAYAT = function(ob,x,y)
>
> {
>
>
>
>Set_Cookie('TODAYATWINDOW_X', x, 10, '/', '', '');
>
>Set_Cookie('TODAYATWINDOW_Y', y, 10, '/', '', '');
>
> }
>
>
>
> closeWindowTODAYAT = function(ob)
>
> {
>
>Set_Cookie('TODAYATWINDOW_SHOW', false, 10, '/', '', '');
>
> }
>
>
>
> Any help would be appreciated.
>
>
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295102
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Multple CFWINDOWS - cannot identify - 2nd try

2007-12-19 Thread Dustin M. Snell
Since I didn't get any replies to this, perhaps I can rephrase the question.
Does anyone know of *any* way. To store the last position of *multiple* open
CFWINDOW objects. All examples I have found only work with one window.

-Original Message-
From: Dustin M. Snell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 18, 2007 4:17 PM
To: CF-Talk
Subject: Multple CFWINDOWS - cannot identify

Hello, I am trying to move our Intranet app to use CFWINDOWs. One of the
things I would like to do is migrate over time. This being the case, I want
to make a routine that saves the X and Y coordinates of a window to a
cookie, so that on the next page load the CFWINDOW is created in the same
position it was at. This gives the impression to the user that the Windows
are "persistant". I have this successfully working with ONE window. 

 

I run into problems with more than one window because there seems to be no
way to check for the existence of a certain window by name, or to extract
the name of whatever window passed the move event. I am running into is that
I need to get the name of the Window (or some other identifying
characteristic) so that I know which cookie to write to. Unfortunately NAME
does not seem to be exposed. Here is my JavaScript code (called via
AJAXOnLoad):

 

moveListener = function() 

  {

  if (ColdFusion.Window != null)

  { 

  var w =
ColdFusion.Window.getWindowObject('todayAtWindow');

 
w.on('move',setCoordsTODAYAT,w);

 
w.on('hide',closeWindowTODAYAT,w); 



 

  }

 

setCoordsTODAYAT = function(ob,x,y) 

{ 

 

Set_Cookie('TODAYATWINDOW_X', x, 10, '/', '', '');

Set_Cookie('TODAYATWINDOW_Y', y, 10, '/', '', '');

}

 

closeWindowTODAYAT = function(ob) 

{ 

Set_Cookie('TODAYATWINDOW_SHOW', false, 10, '/', '', '');

}

 

Any help would be appreciated.





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295099
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4