Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

68
Vistas
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

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

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.

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.