I want to share values across the two javascript functions but below in second function I am unable to get the value from the global variable
// Following two are global variables
var grid;
var masterTable;
function GridCreated(sender, args)
{
grid = sender; // setting values
masterTable = sender.get_masterTableView(); // setting values - Here masterTable has values in it
masterTable.selectAllItems(true);
}
function abc()
{
debugger;
var collectionofordernumber = 0;
var selectedrows = mastertable.get_selecteditems(); // HERE I UNABLE TO GET THE VALUES FROM MASTERTABLE
for (var i = 0; i < selectedrows.length; i++)
{
var row = selectedrows[i];
var cell = mastertable.getcellbycolumnuniquename(row, "ordernumber")
collectionofordernumber = collectionofordernumber + "-" + cell.innerhtml;
}
document.getelementbyid("hdf1").value = collectionofordernumber;
alert('I m here');
}
I want to share values across the two javascript functions but below in second function I am unable to get the value from the global variable
您定义了变量masterTable
但是使用小写mastertable
访问它?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.