View Single Post
Old 10-21-2011, 08:20 PM   PM User | #3
Krupski
Regular Coder

 
Krupski's Avatar
 
Join Date: Dec 2010
Location: United States of America
Posts: 502
Thanks: 39
Thanked 47 Times in 46 Posts
Krupski is on a distinguished road
Quote:
Originally Posted by eddyzhuo View Post
Hello. It is Friday. I thought this will be a simple question, but it seen like hard to find a fast and simple solution. I am working on an online sign in tool. Two browser windows are open at the same time. One is for people to sign in with password and submit their information; another one is for Administrator to see who sign in. I am trying to refresh the Administrator page whenever user finished sign in and submitted their information. These two pages cannot be parent and child page. What will be the easiest way to solve this in ColdFusion or JavaScript? Thank you so much for your time. Have a wonderful weekend.
If you want to transfer data between two different pages that are not "connected" in any way and see the results live, how about this:

Write a tiny Javascript loop that sends the data you want to see into your machine's localStorage (say, at 1 second intervals). Then have another loop running in the admin page reading and displaying the localStorage data, also looping once a second.

It would go like this:

[client login] --> localStorage.setItem

[admin viewer] <-- localStorage.getItem

Haven't tried it, but it should work???

Edit:
Just tried it...... it works!
__________________
"Anything that is complex is not useful and anything that is useful is simple. This has been my whole life's motto." -- Mikhail T. Kalashnikov

Last edited by Krupski; 10-21-2011 at 08:28 PM..
Krupski is offline   Reply With Quote