Solved

Keep-alive browser event and coding one with JavaScript under Cold Fusion

Posted on 2003-12-04
4
261 Views
Last Modified: 2010-04-07
Using the JavaScript functions imbedded within Cold Fusion, I have several cases where a seperate browser window is called, opened, and presented to the user. The second browser window allows the user to work with whatever functions/applications are part of the new window.

The problem with this approach is that the original or sending browser session does not mainatain an 'active-state' and will therefore time-out based based on the pre-defined variables (based on business and security rules) that are required for logging-off an 'in-active' browser session.

My idea to control this is to somehow create a 'keep-alive' event that will stay in constant communication with the sending browser session and will keep it active so long as the user is working or active within the second browser window. This is necessary because the user's original or 'sending' browser session is password/userID protected. Obviously, if the user is working away in the second window that was called by the Javascript event imbedded within the Cold Fusion page of the 'sending' event, then the original session will time-out, log-off and require the user to log back into a new secure session.

I need and event(s) that can either suspend the time out activity of the first browser session until focus returns OR keep sending back an event that will make the sending browser window 'think' it is still active?
0
Comment
Question by:edwill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 25

Accepted Solution

by:
James Rodgers earned 500 total points
ID: 9885947
as in your previous post at

http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20816604.html

try this

in the child window what data is displayed?

if the data will not change after the intial load yopu could use meta refresh to keep reloading the window every x number of seconds

<meta http-equiv="Refresh" content="20;URL=">

and set the url onloading the window

you can also have in the child window

<script>
   function checkparent(){
     if(window.opener.closed){
          this.close();    
      }
     setTimeOut("checkParent",500);
   }
  setTimeOut("checkParent",500);
</script>

this way if the parent closes the child wil close also
0
 
LVL 4

Expert Comment

by:kssaran
ID: 10738638
I am not sure if you are talking abt the session with Server should be kept alive. If you so, what you can do is write one XMLDOM Object based javascript function, which will just make a request to the web server on a periodic basis. You can make it to function for every 1000 ms using setTimeOut function
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question