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!

Change Button Label From Dynamic Action

77VetterApr 15 2016 — edited Apr 15 2016

I have seen a few posts about this : how do I change a button label using a dynamic action? but I can not get it to work for me

We are using Apex 5.0 on Oracle 12

I have  a select list {:PXX_VISITS) and when the user changes the value of the select list I want to change a button (:PXX_ADDVISIT) label so that it contains the value selected

The static id for the button is set to: (PXX_ADDVISITSTATICID)

I have a Javascript dynamic action that fires on change of the select list that contains the following (I have tried all of these individually but none works)

$("PXX_ADDVISITSTATICID").attr('value', 'DAMIFINO');

$("label[for=PXX_ADDVISITSTATICID]>span").html("DAMIFINO");

$("PXX_ADDVISITSTATICID").find(".t-Button-label").text('DAMIFINO'); 

$("#PXX_ADDVISITSTATICID").find(".span").text('DAMIFINO'); 

When I inspect the page I see the following for the button:

<td  align="left"><button value="Add New Visit" onclick="void(0);" class="button-default" type="buttonid="PXX_ADDVISITSTATICID">
  <span>Add New Visit</span>

I have put alerts in the DA so I know I am getting into the code, its just not changing the label or giving me any kind of error. So any ideas why none of the above options are working for changing the label?

TIA

This post has been answered by Mahmoud_Rabie on Apr 15 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 13 2016
Added on Apr 15 2016
4 comments
4,745 views