Menu

#65 Remove excessive HTML

open
nobody
None
5
2008-01-26
2008-01-26
dynodave
No

To aid debugging and compact generated html, remove unuseable/excessive code.

<td><a onclick="javascript:Anthem_FireCallBackEvent(this,event,'_ctl0:CPH1:GV1','Edit$0',false,'','','',true,null,null,null,true,true);return false;" href="javascript:__doPostBack('_ctl0$CPH1$GV1','Edit$0')" style="color:#333333;">Edit</a></td><td>17</td>

1. Events where Anthem_FireCallBackEvent is generated should also remove original doPostBack.
Example: Creating an editable Anthem grid generates the appropriate onclick events for each editable column. That's great! So now "doPostBack" hrefs are no longer valid because onclick does the work and always returns false. With large grids, they become excessive in the html and make it more difficult to read during debugging.

2. Instead of appending ;return false; why not have the called function return false.
Example: onclick="return Anthem_FireCallBackEvent(this,event,'_ctl0:CPH1:GV1','Edit$0',false,'','','',true,null,null,null,true,true);"

Discussion


Log in to post a comment.