The problem is that i have made a function that gives back a value for bottominfo.
var bottominfo = function (){
var vMonth = document.getElementById('cmb_Month').value;
var vYear = document.getElementById('Year').value;
var StartDate = firstdayofmonth(vMonth, vYear);
var EndDate = lastdayofmonth(vMonth, vYear);
var next=getnext(StartDate,EndDate);
var bottominfo='You are going to add'+next;
alert(bottominfo);
return bottominfo;
};
But the function is only called when first load the grid and not every time that i open a form. Is there a way to change bottominfo every time i open a form?
UPDATED 3: I have that method:
jQuery(list).jqGrid('navGrid',pager,{edit:true},
{
width:colwidth*1.05,
height:"auto",
reloadAfterSubmit:true,
closeAfterAdd: true,
recreateForm: true,
drag: false,
onClose: after,
bottominfo: bottominfo()});
Is there a problem with the way i call the function?
UPDATED 2
The other properties are not really helpfull for me, so i erased them. The other code is :
function firstdayofmonth(vMonth, vYear){
return vYear+'-'+vMonth+'-01';
}
function lastdayofmonth(vMonth, vYear){
var myDate=new Date();
var vMonth=parseInt(vMonth)+2;
var vYear=parseInt(vYear);
if (vMonth>12)
{vYear=vYear+1;
vMonth=vMonth-12;}
myDate.setFullYear(vYear, vMonth, 0);
return myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate();
}
var nextprogram=0;
function getnext(StartDate,EndDate) {
next="Applications between"+StartDate+"and"+EndDate;
return next;
}