Discussions
Categories
- 197.2K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Dynamic Action/Select List

Hi,
I'm trying to change a field in a form based on the change of a select list on the same form. I want to do this without submitting the page. I've been able to do this via dynamic actions and Change/DOM Object, the DOM Object being the select list. The text area that I want to change text in is working properly in this regard, without submitting the page.
However, I can't get the select list to actually change to the value that I select. It doesn't matter if I use a dynamic action to submit the page (a second "TRUE" statement after the "change the text area" statement), or select "Submit Page" under "Page Action when Value Changed" in the element properties itself. The select list doesn't change to the new value I select. Is this a bug in 4.2? I can't think of an instance where I WOULDN'T want the value I select to be submitted when I use the select list. Any help out there? Thanks.
Best Answer
-
Hi Neil,
If I'm not mistaken the submit procedure expects a request, since it's conditional. Typically this is the button name of the button that triggers the procedure - my guess is that's something like 'SAVE' or 'SUBMIT'.
Add that submit condition to your javascript: doSubmit('SAVE'). If that works, it would be nicer to create an extra submit procedure, conditional to another button condition, say 'CHANGE' or 'JS' and use that as request for your doSubmit.
A completly different approach: you could also try to do your chagen process and submit with AJAX: Using AJAX in Your Application
Regards,
Vincent
Answers
-
Hi,
What do you mean by ' I can't get the select list to actually change to the value that I select'? Can you put an example on apex.oracle?
Regards,
Vincent Deelen
-
Sorry, Vincent. I'd rather not show the screen shot, it has proprietary material on it.
I have two dynamic actions tied to the "Change" of the select list on the form. The first changes the text in a text area on the form via a PL/SQL function. Which works correctly. The second action is "Submit Page".
Let's say the select list contains the values "ABC", "DEF", and "GHI", and that it's currently "ABC", and the dynamic actions are triggered when I select "DEF". What I mean in the previous post is, when I select "DEF" in the select list, the text changes in the text area as it should, and the page submits, but when the page is done refreshing, "ABC" is still showing in the select list. It didn't change to "DEF", nor did it submit the value to the database.
Thanks for your reply.
-Neil
-
HI,
Sounds like your submit process isn't working.
Check if your select list has a proper query containing display and return values. Make sure there is a submit procedure that handles your DML, and make sure the table column you submit your select list return value to, is of the same type. Also check if your submit button has the correct request to actually trigger your submit process.
Regards,
Vincent
-
Hi, Vincent-
Thanks for the ideas. There is a submit procedure, but it's conditional on a button being clicked on the page. I'm submitting the page via javascript (doSubmit()) or dynamic action when the select list is changed. Do I need to create another submit procedure for when that happens? The table column and submit buttons are in place and work correctly.
Regards,
Neil -
Hi Neil,
If I'm not mistaken the submit procedure expects a request, since it's conditional. Typically this is the button name of the button that triggers the procedure - my guess is that's something like 'SAVE' or 'SUBMIT'.
Add that submit condition to your javascript: doSubmit('SAVE'). If that works, it would be nicer to create an extra submit procedure, conditional to another button condition, say 'CHANGE' or 'JS' and use that as request for your doSubmit.
A completly different approach: you could also try to do your chagen process and submit with AJAX: Using AJAX in Your Application
Regards,
Vincent
-
Vincent, I tried doSubmit('SAVE') and it worked perfectly. Thanks for your help! (I'm still learning javascript)
Regards,
Neil