Hello Team,
Following is the code. Need your help in how to make the lable of the table wrap text and should be of equal size column. Also is there a way to add gridlines to the table like horizontal and vertical lines.
‘(function(){
var table = ‘<table><thead><tr><th> Pipe NPS </th><th> Pipe ID </th><th> Submerged Height Required(m) </th></tr></thead>’;
table += ‘<tbody>’;
var values = [1.049,2.067,3.068,4.026,6.065,7.981,10.02,12,13.25,15.25,17.25,19.25,21.25,23.25,25.25,27.25,29.25,31.25,33.25,35.25,37.25,39.25,41.25,43.25,45.25,47.25];
for(var i in values)
var values1 = [1.315,2.375,3.5,4.5,6.625,8.625,10.75,12.75,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48];
for(var i in values1)
var values2 = [1,2,3,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48];
for(var i in values1)
{
var PipeID;
PipeID=PREC((values[i])*25.4/1000,5);
var PipeOD;
PipeOD=PREC((values1[i])*25.4/1000,5);
var PipeIDInch;
PipeIDInch=(values2[i]);
var CSArea;
CSArea=Math.PI/4*PipeID*PipeID;
var FlowRate;
if(fieldname65==”m3/hr”) FlowRate=fieldname64;
if(fieldname65==”US GPM”) FlowRate=fieldname64*0.22712470704;
var Velocity;
Velocity=(FlowRate/3600)/CSArea;
var FroudeN;
FroudeN=Velocity/POW(9.81*PipeID,0.5);
var Submerge;
Submerge=PipeOD*(1+2.3*FroudeN);
getField(68).setVal(PREC(Submerge,2));
var OutputS;
if(fieldname66==”m”) OutputS=Submerge;
if(fieldname66==”ft”) OutputS=Submerge*3.28084;
if(fieldname66==”inch”) OutputS=Submerge*3.28084*12;
OutputS = PREC(OutputS,2);
table += ‘<tr><td>’+PipeIDInch+'</td><td>’+PipeID+'</td><td>’+OutputS+'</td></tr>’;
}
table += ‘</tbody></table>’;
jQuery(‘.table-here2′).html(table);
return table;
})()’
-
This reply was modified 2 years, 8 months ago by
hheyhey568.