NYCPHP Meetup

NYPHP.org

[nycphp-talk] AJAX and State

Kenneth Downs ken at secdat.com
Thu Sep 6 10:05:18 EDT 2007


tedd wrote:
> At 9:35 PM -0400 9/5/07, John Campbell wrote:
>>  > The beginning of this thread led me to suspect that someone had found
>>>  a way to move data from one browser window to another and I was
>>>  focusing in on that, but that turned to be false.
>>
>> What makes you think you can't move stuff from one window to another?
>> It is completely possible so long as everything is on the same domain.
>> There are ways of doing it across domains, but it is *much* more
>> complicated.
>>
>

There is a deeper user interface design issue here.  Are you attempting 
to ensure that if multiple windows are opened to the same table row, 
that they will always hold the same information in real time?  So that 
if a user is editing in one, he will see the same information in the 
other as he types?

If so, you are probably working too hard, a better user interface 
concept is to trap a request for a duplicate view of the same 
information and give focus to the window/tab that is already holding 
it.  A user will understand and expect this, and it is far simpler to 
program.

This being said, the problem falls out like so:

IF WINDOWS ARE IN SAME SESSION, some mechanism must exist so that all 
open windows/tabs are identifiable as holding a certain state, so that 
you can give focus.  If all you do is give focus, you are now finished.  
If you want to keep the same information open in two windows, have fun, 
you've got quite a bit of programming to do, and you better hire another 
support person, you are going to get a lot of weird phone calls from the 
users.

IF THE WINDOWS ARE NOT IN THE SAME SESSION, you have a bigger problem, 
being of course there is no way to know what is going on.  The simplest 
case is to disallow multiple logins by a single user, then you prevent 
this case altogether.  If this is not an option, well...





-- 
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com    www.andromeda-project.org
631-689-7200   Fax: 631-689-0527
cell: 631-379-0010




More information about the talk mailing list