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

Reply via email to