Click here to Skip to main content
15,891,905 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Integer by reference Pin
Not Active26-Jan-11 2:25
mentorNot Active26-Jan-11 2:25 
GeneralRe: Integer by reference Pin
vhassan26-Jan-11 17:40
vhassan26-Jan-11 17:40 
GeneralRe: Integer by reference Pin
Yusuf27-Jan-11 1:09
Yusuf27-Jan-11 1:09 
QuestionSession Timeout Pin
MWRivera25-Jan-11 10:03
MWRivera25-Jan-11 10:03 
AnswerRe: Session Timeout Pin
Manfred Rudolf Bihy25-Jan-11 10:36
professionalManfred Rudolf Bihy25-Jan-11 10:36 
GeneralRe: Session Timeout Pin
MWRivera25-Jan-11 11:14
MWRivera25-Jan-11 11:14 
GeneralRe: Session Timeout Pin
MWRivera26-Jan-11 4:52
MWRivera26-Jan-11 4:52 
QuestionPageMethods in Jquery Pin
Vimalsoft(Pty) Ltd25-Jan-11 3:11
professionalVimalsoft(Pty) Ltd25-Jan-11 3:11 
function ProcessAction() {


   PageMethods.CheckSessionExpiration(OnCheckSessionExpirationComplete, OnCallError);

    if (IsLogin == true) {
        alert("Inside the Function");
        var txtNote = $("[id$=txtNote]").val();
        var txtIdentNo = $("[id$=txtIdentNo]").val();
        var sIdentNo = "";

        DisableControls();
        CleanIdentNoList();
        if (ValidFields()) {
            //Get Subscriber Detail
            gAction = $("[id$=cmbAction]").val();
            gNote = txtNote;
            sIdentNo = jQuery.trim(txtIdentNo);
            gMSISDNList = sIdentNo.split("\n");
            gMSISDNIndex = -1;

            ProcessNextItem();
        }
        else {
            EnableControls();
        }
    }
    else {
        window.location = "Login.aspx";
    }

}


and i have a Callback function defined like this

 function OnCheckSessionExpirationComplete(result,methodName) {
    if (result == false) {
        
        IsLogin = false;
    }
    else {

        IsLogin = true;
    }

}


Now the "IsLogin" variable is a Global variable defined like this


var IsLogin = true;


What i want to do is to redirect the user if the Session is null, as you can see i have added the line
System.Web.HttpContext.Current.Session["CurrentLoginUser"] = null; //This is for Testing Purpose


For testing Purpose , but my problem is is that, even if its null, the


alert("Inside the Function");


is fired, what i am i doing wrong.

THanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

AnswerRe: PageMethods in Jquery Pin
Not Active25-Jan-11 3:57
mentorNot Active25-Jan-11 3:57 
GeneralRe: PageMethods in Jquery Pin
Vimalsoft(Pty) Ltd25-Jan-11 20:33
professionalVimalsoft(Pty) Ltd25-Jan-11 20:33 
Questionhow to enable/disable multiselection of table cells Pin
asbasir24-Jan-11 22:36
asbasir24-Jan-11 22:36 
Questionopener.document Pin
fififlowertot24-Jan-11 22:06
fififlowertot24-Jan-11 22:06 
AnswerRe: opener.document Pin
Richard MacCutchan25-Jan-11 3:03
mveRichard MacCutchan25-Jan-11 3:03 
AnswerRe: opener.document Pin
GenJerDan25-Jan-11 3:10
GenJerDan25-Jan-11 3:10 
QuestionChanging the CSS properties of a menu bar. Pin
Douglas Kirk24-Jan-11 20:56
Douglas Kirk24-Jan-11 20:56 
Questionvar abc = abc || {}; in Java Script Pin
Umair Feroze18-Jan-11 0:27
Umair Feroze18-Jan-11 0:27 
AnswerRe: var abc = abc || {}; in Java Script Pin
Umair Feroze19-Jan-11 3:12
Umair Feroze19-Jan-11 3:12 
GeneralRe: var abc = abc || {}; in Java Script Pin
jsc4219-Jan-11 5:53
professionaljsc4219-Jan-11 5:53 
GeneralRe: var abc = abc || {}; in Java Script Pin
Not Active19-Jan-11 7:09
mentorNot Active19-Jan-11 7:09 
GeneralRe: var abc = abc || {}; in Java Script Pin
jsc4220-Jan-11 3:30
professionaljsc4220-Jan-11 3:30 
GeneralRe: var abc = abc || {}; in Java Script Pin
Not Active20-Jan-11 3:49
mentorNot Active20-Jan-11 3:49 
QuestionGet JSON Array [modified] Pin
dataminers17-Jan-11 12:04
dataminers17-Jan-11 12:04 
Questionzoom in and zoom out for entire page in all browser Pin
niladri0310-Jan-11 1:56
niladri0310-Jan-11 1:56 
AnswerRe: zoom in and zoom out for entire page in all browser Pin
J4amieC10-Jan-11 2:42
J4amieC10-Jan-11 2:42 
AnswerRe: zoom in and zoom out for entire page in all browser Pin
Not Active10-Jan-11 2:49
mentorNot Active10-Jan-11 2:49 

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.