Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Javascript help: get the current row inside Tabular Form

seanzhFeb 6 2015 — edited Feb 9 2015

Hi, Everyone,

I hit a roadblock for a simple JS code: to get a current row for my tabular form. My environment is : Apex 4.2.6 on Oracle 11.2 with Bootstrap 3 for styling.

The tabular Form Query is simple like this:

select

"REF#",

"INV#",

"PART#",

"DISCOUNT",

"PRICE",

"UPC",

"DESCRIPTION",

qty,

"LINE#",

' ' stepper

from Order_items

Now the focus here is "stepper", it's defined as "text Save no state", in HTML expression I added this:

<div class="btn-group">

  \<button type="button" class="btn btn-lg"  onclick="plusClicked()">+\</button>

<button type="button" class="btn btn-lg" onclick="minusClicked();">-</button>

\</div>\<!-- /button  -->

The display is like the following:

Screen Shot 2015-02-06 at 9.44.49 AM.png

In the Page header Javascript section:

function plusClicked(){

var row, qty;

row=$(this).closest("tr");

// tried row=$(this).parent().closest("tr");

// same undefined result

qty=row.find('input[name=f09]').val(); //f09 is the input name for qty column

alert('plus clicked qty='+ qty);

}

The result is always: 'plus clicked qty=undefined'. Inspect code says this:

Screen Shot 2015-02-06 at 9.57.49 AM.png

Any help and suggestions are greatly appreciated.

This post has been answered by Jorge Rimblas on Feb 6 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2015
Added on Feb 6 2015
3 comments
210 views