Solved

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

Posted on 2003-12-04
4
255 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
4 Comments
 
LVL 25

Accepted Solution

by:
James Rodgers earned 500 total points
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
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…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now