D
DavidC
I have an asp.net application that dumps out a GridView from a datasource. I
want to access the controls on the rows via Javascript at the client rather
than use Ajax. For example I have a control id below as example of a table
row:
gvChecks_ctl02_txtClearedAmount
I am using js below but it only gives me text up to the first underscore. I
want to be able to dig out everything between the 2 underscores. In above
example I need to return 'ctl02'. Can someon help? Thanks.
var sid = obj.id;
var unloc = sid.indexOf('_', 0);
var vrowid = sid.substr(0, unloc);
var sctlid = 'gvChecks_' + vrowid + '_txtClearedAmount';
want to access the controls on the rows via Javascript at the client rather
than use Ajax. For example I have a control id below as example of a table
row:
gvChecks_ctl02_txtClearedAmount
I am using js below but it only gives me text up to the first underscore. I
want to be able to dig out everything between the 2 underscores. In above
example I need to return 'ctl02'. Can someon help? Thanks.
var sid = obj.id;
var unloc = sid.indexOf('_', 0);
var vrowid = sid.substr(0, unloc);
var sctlid = 'gvChecks_' + vrowid + '_txtClearedAmount';