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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Get value of pl/sql-generated form element?

backinthedaySep 4 2013 — edited Sep 6 2013

Hello,

I have an APEX page with a PL/SQL dynamic region.  This regions calls a PL/SQL procedure that generates html.  In this html, a form is opened with a text box (id="txtUserEnteredText") awaiting user input.  I need to know how to set the value of an APEX page item on a button click with the user-entered text. What I have tried is the following dynamic action for the button (no errors or data are returned):

-- Dynamic Action

Event: On Click

Section Type: Button

Button: P20_GET_TEXT

-- Action

Action: Set Value

Set Type: JavaScript Expression

JavaScript Expression: $x(document.getElementById('txtUserEnteredText').value);

-- Affected Elements

Selection Type: Item(s)

Item(s): P20_DISPLAY_TEXT

What I'm expecting is that the P20_DISPLAY_TEXT item will show the user-entered text after the button is clicked.  Another way to say this might be that I need is to know how to retrieve a value from an already rendered HTML element generated by the PL/SQL Web ToolKit via a PL/SQL dynamic region.  The HTML element in question is a text box that allows a user to enter text.  I need to retrieve the user's entered text in order to process that data instead of using any Web ToolKit procedures.

I know this is a crazy way to do things, but I just need to know if I can do this and how.

I'm using APEX 4.2.2 on Database 11.2.0.3.

Thanks,

-Seth.

This post has been answered by backintheday on Sep 5 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2013
Added on Sep 4 2013
18 comments
3,953 views