Javascript - Problem in accessing global variables -


i want share values across 2 javascript functions below in second function unable value global variable

// following 2 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         mastertable.selectallitems(true);     }        function abc()     {         debugger;         var collectionofordernumber = 0;                  var selectedrows = mastertable.get_selecteditems(); // here unable values mastertable          (var = 0; < 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 share values across 2 javascript functions below in second function unable value global variable

you defined variable mastertable accessing lowercase mastertable?


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -