{"id":177,"date":"2017-06-21T05:00:32","date_gmt":"2017-06-21T03:00:32","guid":{"rendered":"http:\/\/geekinto.com\/?p=177"},"modified":"2017-06-21T05:59:14","modified_gmt":"2017-06-21T03:59:14","slug":"oracle-apex-calculate-tabular-form-rows-columns-by-js","status":"publish","type":"post","link":"https:\/\/howoracleapex.com\/?p=177","title":{"rendered":"Oracle APEX | Calculate Tabular Form [Rows &#038; Columns] by JS"},"content":{"rendered":"<p>Calculate Tabular Form [Rows &amp; Columns] by JavaScript<\/p>\n<p>Please follow next steps..<\/p>\n<ol>\n<li>Copy this code and paste it into <em>Page &gt;&gt;\u00a0Function and Global Variable Declaration<br \/>\n<\/em><\/p>\n<pre class=\"lang:js decode:true \">\/\/ Get sum Rows\r\nfunction getSumRows(){\r\n    $('input[name=\"f06\"]').each(function () {\r\n        var rowId       = this.id.substr(4);\r\n        var salVal      = $('#f04_'+rowId).val();                                   \/\/ Sal Value\r\n        var taxVal      = $('#f05_'+rowId).val();                                   \/\/ Tax Value\r\n        var commVal     = $('#P2_COMMISSION').val();                                \/\/ Commission Value\r\n        var calc        = Number(salVal) + Number(taxVal) + Number(commVal);        \/\/ Calculation\r\n\r\n        \/\/ Set Value\r\n        $('#f06_'+rowId).val(calc);\r\n }); \r\n    \r\n    \/\/ Every Calculate will be check values and set Total ...\r\n    getTotalNetColumn();\r\n}\r\n\r\n\/\/ Get Total of Net Column\r\nfunction getTotalNetColumn() {\r\n    var clmn=new Array();\r\n    var tol_net=0;\r\n    clmn=document.getElementsByName(\"f06\");\r\n\r\n    for(i=0;i&lt;clmn.length;i++)\r\n    {\r\n        tol_net = (tol_net*1) + (clmn[i].value.replace(\/,\/g, '') * 1);\r\n    }\r\n\r\n    \/\/ Set Total Value\r\n    $('#P2_TOTAL').val(Number(tol_net));\r\n}<\/pre>\n<p>&nbsp;<\/li>\n<li>Copy this code and paste it into <em>Page &gt;&gt; Execute when Page Loads<br \/>\n<\/em><\/p>\n<pre class=\"lang:js decode:true \">\/\/ Get Sum Rows of tabular\r\ngetSumRows();<\/pre>\n<p>&nbsp;<\/li>\n<li>Watch next Clip<br \/>\n[embedyt] https:\/\/www.youtube.com\/watch?v=eHWtpukGyUE[\/embedyt]<\/li>\n<li>Sample Application \u00a0<a href=\"\/files\/apex_app\/Calculate_Tabular_Form_by_JavaScript____APEX5.1.sql\">Download<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>Regards,<\/p>\n<p>Amr<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Calculate Tabular Form [Rows &amp; Columns] by JavaScript Please follow next steps.. Copy this code and paste it into Page &gt;&gt;\u00a0Function and Global Variable Declaration \/\/ Get sum Rows function getSumRows(){ $(&#8216;input[name=&#8221;f06&#8243;]&#8217;).each(function () {&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,22,13,12,2],"tags":[],"class_list":["post-177","post","type-post","status-publish","format-standard","hentry","category-apex","category-apex-api","category-jquary","category-jscript","category-oracle"],"_links":{"self":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177"}],"version-history":[{"count":3,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":180,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions\/180"}],"wp:attachment":[{"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howoracleapex.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}