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

  • SEARCH
  • Home
  • 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 8234383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:27:24+00:00 2026-06-07T18:27:24+00:00

Edit: I see the issue is with using live instead of on. I fixed

  • 0

Edit: I see the issue is with using live instead of on. I fixed that however, can’t get the second timer to fire..

Error: Object [object Object] has no method "popup"

I am trying to implement a client side session time out using jquery mobile. My code is at: http://jsfiddle.net/83BSW/5

Appreciate any insights..

Here is the code for convenience:

<!DOCTYPE html>
<html> 
<head> 
    <title>My Page</title> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>


<!-- Application specific -->

<script> 
var first_timer = 2 * 1000;
var second_timer = 3 * 1000;
var down = -1;

function initTimer() {
  down = setTimeout(processTimeout, first_timer)
}

function processTimeout() {
        down = setTimeout(logout, second_timer);
        $.mobile.changePage('#timeout1',{transition:'slide', role:'dialog'});
        //alert ("Timeout of first timer, timerid:" + down );
}

function logout() {
    $("#timeout").popup('close');
  $.mobile.changePage('#timeout2',{transition:'slide', role:'dialog'});
  alert("You are logged out");
//  window.location = "http://www.google.com"
}

function resetMyTimer() {
  if ( -1 != down )
    clearTimeout(down);
  alert("Restarting timer");
  initTimer();
}

$("#loadingpage").on(function() {
    resetMyTimer();
});

initTimer();

</script>

</head>
<body>
<div data-role="page" id="loadingpage">
  <div data-role="header" data-position="fixed"> 
      <div class="headerlogo"> </div>
      <h1> Test </h1>
  </div> 
  <div data-role="content" >
    <div id="ssagov"> 
    <h1> Hi there </h1>
    </div> 
    <input type="button" data-shadow="false" data-corners="false" value="Next"  />
  </div><!-- /content --> 
</div><!-- /launch page -->
<div data-role="page" id="timeout1" data-role="popup">
  <div data-role="header" data-backbtn="false">
    <h1>Timeout1</h1>
  </div>
  <div data-role="content">
    Your session will timeout in 2 mins.
  </div>
</div>
<div data-role="page" id="timeout2" data-role="popup">
  <div data-role="header" data-backbtn="false">
    <h1>Timeout2</h1>
  </div>
  <div data-role="content">
    Your session has timed out
  </div>
</div>

</body>
</html>​
  • 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-07T18:27:25+00:00Added an answer on June 7, 2026 at 6:27 pm

    Finally I fixed the issue, instead of popup, I should be using dialog. Here is the working version: http://jsfiddle.net/83BSW/6

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

Sidebar

Related Questions

EDIT: See this in action here: http://jsbin.com/emobi/5 -- and that's using mouseenter/mouseleave. I have
EDIT: You can see the search box live here . Before I explain, let
EDIT: See my answer below--> I am wanting to have a view that when
I have this strange issue with my web app. You see, I'm using jQuery
EDIT my issue had nothing to do with SVN itself (see my answer below)
Edit 4: I was finally able to solve my own issue. See checkmark answer
Intro: EDIT: See solution at the bottom of this question (c++) I have a
EDIT: I see why it doesn't run twice. I have the Ajax.BeginForm() call inside
I have a Controller with two Edit methods (see below). When I submit the
PLEASE SEE THE EDIT BELOW, THE REPORT SEEMS TO USE CACHED DATA? I cant

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.