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

Oracle APEX - Tabular form datepicker month and year selector

Customize LOGIN PAGE Using css! Oracle Apex

body{font-family: 'Droid Arabic Kufi', sans-serif; font-size:1.3rem;} .t-PageBody--login .t-Body { background-image: url(#WORKSPACE_IMAGES#BG.jpeg); background-position: center center; background-repeat:  no-repeat; background-attachment: fixed; background-size:  cover; background-color: #45484d; background-color: -moz-linear-gradient(top, #45484d 0%, #000000 100%); background-color: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); background-color: linear-gradient(to bottom, #45484d 0%,#000000 100%); } body .t-Login-title , .t-Login-region {     background-color: rgba(128, 152, 180, 0.51); color: #F8F8F8 } .t-Login-body {     text-align: right; } .popup {   z-index: 10; margin:100px auto; display:block; text-align:center; -moz-box-shadow: 0 0 10px rgba(0,0,0,.18); /* drop shadow */ -webkit-box-shadow: 0 0 10px rgba(0,0,0,.18); /* drop shadow */ -o-box-shadow: 0 0 10px rgba(0,0,0,.18); /* drop shadow */ box...

016 Building an Application part 10 Master 2Details IG [Oracle Apex 5.1 Tutorial]

Developing the Maintain Project Form   Regions Updating the Milestones Interactive Grid Begin by updating the second interactive grid on page 5 which queries the DEMO_MILESTONES table . To navigate to the Maintain Project form: 1.    From the Application home page, click 5 - Maintain Project . To rename the second Maintain Project region (the name was inherited from a copy procedure in an earlier lesson): 2.    Scroll to the bottom of the Rendering tree or Layout tab, and click the Maintain Project sub region (note the italicized name). 3.    In the Property Editor: a.    Identification: Title - enter Milestones To change how the columns display: 1.    In the Rendering tree under Milestones, expand the Columns folder. 2.    Select the ID column. 3.    In the Property Editor: a.    Identification: Type - select Hidden 4.    In the Rendering tree, clic...