I am having problems setting the educationflag variable to 1. The problem I am solving is not to call enableEdit.php file if flag is 1.
I want to set the flag to 1 when the control comes in the if condition. Right now the control comes in the if condition but does not set the variable to 1. My code is printed below. I
var educationFlag=0;
function editEducation(class){
//I send education in class variable. So class ='education';
var condition=eval(class+'Flag');
if ( condition == 0 ){
$.ajax({
url: "enableEdit.php",
data: "class="+class,
success: function(msg) {
}
})
eval(class+'Flag'=1);
}
}
Thanks