Mayukh Raaj Mayukh Raaj - 1 year ago 77
Javascript Question

How to include rowspan and colspan dynamically inside <td> tag based on some conditions

I know i can include statically when i want to merge the columns but if i need to check some conditions and based on that only i need to merge then how this could be done?

my idea was like this:

var span="";
if(some condition)

and then setting this variable inside as:

<td +span+>

but it doesn't work like that…Any suggestion how to do this?

Answer Source
var span='';
var table='';

if(some condition)

var table="<tr><td"+span+"></td></tr>":
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download