Solved

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

Posted on 2003-12-04
4
269 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
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.
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 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…

626 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