Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9136987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:01:52+00:00 2026-06-17T09:01:52+00:00

I am using ColdFusion 8 and jQuery. I have a page that uses a

  • 0

I am using ColdFusion 8 and jQuery.

I have a page that uses a lot of ajax. When a button on the page is clicked, some data is sent to the CFC to retrieve data. The data retrieval requires session variables. If the page has sat unused for a while and the session has ended, the page creates an error. The user can click all he wants but won’t see the error because it’s behind the scenes in ajax. Firebug shows me that the session variable no longer exists. Here’s the error:

Element USERINFO.CATALOG_ID is undefined in SESSION.

At the top of my CFC, I move things from the APPLICATION and SESSION scopes to the VARIABLES scope like this:

<cfcomponent>

    <cfscript>
    // DEFAULT DATASOURCE
    VARIABLES.DS = APPLICATION.Datasource;
    // SET CATALOG AND MARKET
        VARIABLES.Catalog_ID = SESSION.UserInfo.Catalog_ID;
    VARIABLES.CatalogType = THIS.getCatalogType(VARIABLES.Catalog_ID);
    </cfscript>

    <cffunction name='SomeFunction>
    </cffunction>

<cfcomponent>

What is a good way to test if the session is still active and if not, return something to the page instructing it to refresh itself thereby restarting this session?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:01:53+00:00Added an answer on June 17, 2026 at 9:01 am

    If I want to keep a session open I use a very small (1 pixel) iframe. The page in the iframe simply does a meta refresh every x seconds and this keeps the session alive.

    Having said that, it’s rare that I want to keep a session alive. They timeout for a reason. We also incorporate a javasript countdown timer that directs the user to another page at about the same time the session times out. In the scenario describe above, the user would not be able to click the button because it wouldn’t be there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a link when clicked processes a coldfusion page that downloads a file
I am using ColdFusion 8 and jQuery 1.8. I have some info coming out
I am using ColdFusion 8 and jQuery. I am working on a page that
I have this HTML: <input type=text id=query data-source=whatever> I have some jQuery that changes
I am using ColdFusion (Railo 3.3), and I have several forms using jQuery that
I'm using Coldfusion ORM (Hibernate), and have a cfc mapped to a database table.
I have a form that validates using the jQuery plugin: Validation, v1.9.0. The validation
I'm using on my page both colorbox jQuery plugin and AJAX for the asyncronous
I am trying to access userdata I have sent from the server (using coldfusion)
I am using ColdFusion 9 and jQuery. I am using CFAJAXPROXY. I have am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.