• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

209
Views
How to reset list to blank using javascript in Oracle apex

I have a select list component in Oracle apex and one button

Select list drop down as below values I can choose any one

-

  • A
  • B
  • C

On button click I have written a java script

if $('#P1_DROPDOWN').val() == 'A'
{
   alert.message('A value is selected') 
}
else
{
   apex.item.setvalue(index[0])  -- blank 
   or 
   reset the list to none selected 
} 

How do I reset the List item to none o original state

about 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Here is an example for a select list that has "Display Null Value" set to "Yes" and no value for "Null Return Value".

if (apex.item( "P1_DROPDOWN" ).getValue() == 'A') {
    alert('a was clicked');
} else {
    apex.item( "P1_DROPDOWN" ).setValue( "" );
}

If there is a return value for the Null value, then change the setValue accordingly.

Side Note: Instead of clearing the selected value a validation indicating why the selected value is not the correct one might give a better user experience.

about 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error