Skip to main content

Oracle Apex - Tabular Form With JavaScript


The Function:
function sumUpRows(f12,f05,f07,f09,f11){
       var numofcols = arguments.length;
       var numofrows = $("[name=" + arguments[1] + "]").length;
       var summ =0;
       var xy = parseFloat(document.getElementById("P56_INITIAL_BALANCE").value);
       for(x=0;x<numofrows;x++){
           for(i=1;i<numofcols;i++){
            summ = summ + Number($("[name=" + arguments[i] + "]").eq(x).val());            
           }
           $("[name=" + f12 + "]").eq(x).val( parseFloat((Math.round(summ * 100) / 100)+xy).toFixed(2));
       }
    }
Calling The function :
javascript: sumUpRows("f12","f05","f07","f09","f11")

Comments

Jahid said…
I have a tabular form based on a collection...Now I need to update this collection onchange event...I tried a lot..but could not resolve for collection....
Thanks in advance.

Popular posts from this blog

My Resume (Hesham Abu Elenain)

https://apex.oracle.com/pls/apex/sharko/r/h-apex-cv/home  Thanks, @joelkallman @alhadara your support and motivation. My CV. https://t.co/87uW3O9CLH #orclapex #lowcode pic.twitter.com/lwJZ5ztYuC — Hesham (H-ā'pěks) (@habuelenain) July 6, 2020

Oracle APEX - Tabular form datepicker month and year selector

Oracle APEX 20.2 Patch p32006852_2020_Generic Installation