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...

015 Building an Application part 09 DynamicAction Validation Oracle Apex...

 Changing the Project Form Appearance with Live Template Options Consistency is important for your application’s usability. Update the properties of the Project form modal dialog to match the look and function of the Maintain Team Member modal dialog. Some of this should seem familiar because you are applying the same set of settings from earlier in the tutorial to a new page. Use the Live Template Options on the Developer Toolbar to modify the appearance of the form in the runtime, then switch to Page Designer for more elaborate changes (such as moving buttons and changing the condition of fields). 1.    On the Projects page in the runtime, click the Edit icon (pencil) adjacent to the name of any project. The browser navigates to the Maintain Project form . To update the page using Live Template Options: 2.    On the Developer Toolbar, click Quick Edit . 1.    Hover your mouse over the Maintain Project region (...