Thursday, 31 July 2014

jQuery - loop through a Tabular Form

This question is one of the frequently asked questions - "How do I loop through a tabular form using a dynamic action?". This example shows how to loop through a tabular form and set the values for each row to what ever you want. Using apex_application.g_fxx array is not an option for onload processes or dynamic actions. It can only be used in an on submit process. Using jQuery in a simple loop it is possible to read / set any of the values in any column. Try it out.

2 comments:

Lev said...

Hi Denes,

Thanks for a great example.
Probably, you can use jQuery function each()
- than you don't need to find item's
id - you can use this instead:

$("input[name='f03']").each(function(index, value)
{
var val = $(this).val();
...
}

Denes Kubicek said...

O.K. Thanks for the hint. I will look into it.

Denes Kubicek