Skip to Content
0
Former Member
Jul 15, 2005 at 03:46 PM

Javascript validation for dropdown value in the table view

21 Views

I have a dropdown listbox in a table view (I’m using iterator). I’d like to do a client side validation when the user select one of the value in the dropdown box.

Here is my code in the class iterator:

WHEN 'PERNO'.

DATA dropdownbox TYPE REF TO cl_htmlb_dropdownlistbox.

CREATE OBJECT dropdownbox.

dropdownbox->id = p_cell_id.

GET REFERENCE OF me->z_crew_list INTO dropdownbox->table.

dropdownbox->nameofkeycolumn = 'Name'.

dropdownbox->nameofvaluecolumn = 'Value'.

dropdownbox->selection = get_column_value( 'PERNO' ).

dropdownbox->onClientSelect = 'employeeCheck()'.

dropdownbox->width = 'auto'.

p_replacement_bee = dropdownbox.

I would like to get the selected employee number and validate in the employeeCheck().

How do I get the value of the selected PERNO? Can I use document.getElementById.value?

Thanks,

Maria