Click here to Skip to main content
15,886,919 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Java Script Slider Pin
Afzaal Ahmad Zeeshan18-Mar-15 3:47
professionalAfzaal Ahmad Zeeshan18-Mar-15 3:47 
Questiongetting JSON data in much smaller way. Pin
Asif Rehman14-Mar-15 21:01
Asif Rehman14-Mar-15 21:01 
AnswerRe: getting JSON data in much smaller way. Pin
NAEEM272716-Mar-15 21:53
NAEEM272716-Mar-15 21:53 
AnswerRe: getting JSON data in much smaller way. Pin
Kornfeld Eliyahu Peter18-Mar-15 1:39
professionalKornfeld Eliyahu Peter18-Mar-15 1:39 
QuestionRe: getting JSON data in much smaller way. Pin
Asif Rehman19-Mar-15 0:25
Asif Rehman19-Mar-15 0:25 
AnswerRe: getting JSON data in much smaller way. Pin
Kornfeld Eliyahu Peter19-Mar-15 0:35
professionalKornfeld Eliyahu Peter19-Mar-15 0:35 
QuestionConnect a radio button, select box, and checkbox within a function. Pin
Member 1150835012-Mar-15 17:53
Member 1150835012-Mar-15 17:53 
QuestionThe Timer displayed is 1 hr (HH:MM:SS) in decrement order. I have to display a pop out when 50 mints complete after that remaining 10 mints one pop up should display saying 10 mints with 0 sec. After that for every 2 mintues the pop up appear showin Pin
Member 115026795-Mar-15 18:39
Member 115026795-Mar-15 18:39 
<s:url id="sessionExpirePopUp" action="sessionOutCiscoGSS" namespace="">

<s:set name="sessionExpirePopUpNew"
="" value="#sessionExpirePopUp.replace("&","&")">




var timeOutSesVal = 1000 * 60 * 50; // 30 min: session validation time
var timeOutSesExp = 1000 * 60 * 10; // 10 min: session expiry time
var lastActivitySesVal = new Date().getTime();
var lastActivitySesTO;
var reducingTimeSec;
var Min, Sec;

/* Sesion time out and session expiry code starts here */
//below method code is executed until showing sesion validation popup
var checkTimeout;
checkTimeOut = function() {
if (new Date().getTime() > lastActivitySesVal + timeOutSesVal) {
// document.getElementById('icwModalWashout').style.visibility = 'visible';
// document.getElementById('icwModal4').style.visibility = 'visible';

lastActivitySesTO = new Date().getTime();
checkTimeoutSesExp();// this method call is to start expiry timer and show expired message dialog
} else {
window.setTimeout(checkTimeOut, 1000 * 60 * 2); // check 10 per second
}
// }
}

//below method code is executed on click of continue button in first popup
function checkTimeOutAgain() {
lastActivitySesVal = new Date().getTime();
lastActivitySesTO = lastActivitySesVal + 1000 * 60 * 9999;//set some indefinite time to avoid showing session expiry popup
checkTimeOut();
}

//below code is for counter display
function showXMinXSec() {
reducingTimeSec = Math
.floor(((lastActivitySesTO + timeOutSesExp) - new Date()
.getTime()) / 1000);
//calculate minutes and secods
Min = Math.floor(reducingTimeSec / 60);
Sec = reducingTimeSec % 60;
if (Min > 0) {
window.confirm("your data will be lost in " + Min + " Minutes and "
+ Sec + " Seconds. Please save your data");
} else {
window.confirm("your data will be lost in " + Sec
+ " Seconds. Please save your data");
}
}

//below method code is executed for showing next/sesion expiry popup
var checkTimeoutSesExp;
checkTimeoutSesExp = function() {
if (new Date().getTime() > lastActivitySesTO + timeOutSesExp) {
//hide Session Timeout pop up/icwModal4 and enable Session expired/icwModal5 pop up after invalidating session
document.getElementById('icwModal4').style.visibility = 'hidden';
//invalidating session
// $.ajax({
// type: "POST",
// url: '<s:property value="#sessionExpirePopUpNew"/>',
// dataType: "json",
// success: function(){
// document.getElementById('icwModal5').style.visibility = 'visible';
// },
/* error: function(data){
alert('Error in ajax call/response!');
getElementById('icwModalWashout').style.visibility='hidden';
}*/
// });
return false;
} else {
//write logic to show X minutes and X seconds
showXMinXSec();
window.setTimeout(checkTimeoutSesExp, 1000 * 60 * 2); // check 2 min
}
}


QuestionRe: The Timer displayed is 1 hr (HH:MM:SS) in decrement order. I have to display a pop out when 50 mints complete after that remaining 10 mints one pop up should display saying 10 mints with 0 sec. After that for every 2 mintues the pop up appear sh Pin
ZurdoDev11-Mar-15 9:47
professionalZurdoDev11-Mar-15 9:47 
QuestionHow I make a javascript wedget to place another website wedget Pin
Member 115008415-Mar-15 1:19
Member 115008415-Mar-15 1:19 
QuestionUnit testing for JavaScript/JQuery Code Pin
SaranshSrivastava28-Feb-15 20:53
SaranshSrivastava28-Feb-15 20:53 
Questionimage preview and save to a folder Pin
Member 1116631824-Feb-15 6:35
professionalMember 1116631824-Feb-15 6:35 
AnswerRe: image preview and save to a folder Pin
ZurdoDev24-Feb-15 11:01
professionalZurdoDev24-Feb-15 11:01 
AnswerRe: image preview and save to a folder Pin
Afzaal Ahmad Zeeshan28-Feb-15 22:06
professionalAfzaal Ahmad Zeeshan28-Feb-15 22:06 
GeneralRe: image preview and save to a folder Pin
Afzaal Ahmad Zeeshan16-Jun-15 5:43
professionalAfzaal Ahmad Zeeshan16-Jun-15 5:43 
GeneralRe: image preview and save to a folder Pin
Simewu16-Jun-15 12:08
professionalSimewu16-Jun-15 12:08 
AnswerRe: image preview and save to a folder Pin
Simewu16-Jun-15 12:09
professionalSimewu16-Jun-15 12:09 
Questionauto submit form Pin
joe-hanh24-Feb-15 6:22
joe-hanh24-Feb-15 6:22 
AnswerRe: auto submit form Pin
Afzaal Ahmad Zeeshan24-Feb-15 6:47
professionalAfzaal Ahmad Zeeshan24-Feb-15 6:47 
GeneralRe: auto submit form Pin
joe-hanh25-Feb-15 2:31
joe-hanh25-Feb-15 2:31 
QuestionGet selected Li from UL Pin
indian14323-Feb-15 15:02
indian14323-Feb-15 15:02 
AnswerRe: Get selected Li from UL Pin
Matt U.24-Mar-15 9:59
Matt U.24-Mar-15 9:59 
AnswerRe: Get selected Li from UL Pin
Simewu15-Jun-15 15:23
professionalSimewu15-Jun-15 15:23 
QuestionHiding a button which doesn't have an ID or Name Pin
indian14322-Feb-15 8:52
indian14322-Feb-15 8:52 
SuggestionRe: Hiding a button which doesn't have an ID or Name Pin
Kornfeld Eliyahu Peter23-Feb-15 6:07
professionalKornfeld Eliyahu Peter23-Feb-15 6:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.