1 Reply Latest reply: Nov 3, 2013 3:10 PM by LA-APEX-DEv RSS

    Tabular form onchange


      I’m using APEX, I’ve requested the latest version be installed but I have to wait for other higher priority projects before they will consider my request.


      With that said, I’ve built a manual tabular form based on a collection.  The fields on the form are parameter number, parameter description and parameter value.  For new and existing rows, parameter description is read only and parameter value is editable.  For existing rows, parameter number is read only.  For new rows, it is editable.


      On a new row, when the user enters a parameter number, I want search and database and pull back the parameter description and a default for the parameter value, if one exists.  And have them display without having to submit the page.  In regular forms, I’ve worked with an onchange action firing a JavaScript to call an application process.  I’ve also started playing with dynamic actions and can usually get either to work.


      But with a tabular form, I cannot get either to work.  To the parameter number column, I’ve tried adding an element attribute of onchange=alert(“param change”); and the alert never appears to fire.  I’ve also tried onchange=”ParamNumber(this);” where the ParamNumber Javascript just does an alert.  Then I tried changing the element attribute to class=”ParamNumber” and adding a dynamic action with an event of change, a selection type of jQuery selector, a jQuery selector of .ParamNumber and a true action of alert. Again nothing seems to fire.


      Looking at the HTML produced via Firebug, I don’t see the onchange or class attributes.  I even tried adding the onchange to the report selection in the apex_item.text call.


      I’m obviously missing something.  Is this doable in APEX 4.0 or do I need to wait for the new version to be installed?


      Also obvious is that I’ve found several references on how to reference the row number of the new row in JavaScript, even though I don’t speak JavaScript, another thing on my list to do.  So I figured I’d start out simple and make sure I could see that the parameter number was being entered.



      Ray Gillfillan

        • 1. Re: Tabular form onchange

          In regard to tabular form, there might be some new trick. However, I began my development career from apex 2.6, so the technique I used back then and now, still using this method:


          select apex_item.text(1,name,20,30,'onKeyUp="javascript:{alert(this.value)};"') from emp;