Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

[CustomObject] Catch VL change

SergeiBakhaev
Contributor III

Hello!

 

Is there any way to catch value list selection change? Or fields change in general?

I found, that when VL is dropdown, on value selection there is one DOM change (div with phui_combobox_selectable class).

Is there something similar for other types of VL? I haven't found any.

 

Best regards,

Sergei

1 ACCEPTED SOLUTION

Accepted Solutions

This is working just fine in 6.4 SP1 P3:

<script>
     Sys.Application.add_load(function() {
          $('div[id*="' + 19686 + '"]').change(function() {
               alert('dropdown test');
          });
     });     
</script>

View solution in original post

9 REPLIES 9

Ilya_Khen
Champion III

Have you tried something like this for dropdown?

$('div[id*="' + Id + '"]').click(function() {
         
});         


$('div[id*="' + Id + '"]').change(function() {
         
});          ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I've tried your code with console log, but nothing happened.

Neither .click or .change.

$('div[id*="' + 15798 + '"]').change(function() {
    console.log('dropdown test');
});

Interesting, it is working for me. And when I searched in the community, it seems someone else also made it work:

Values List Custom Object OnChange Event 

Though, I am using not the latest version of Archer.

This is working just fine in 6.4 SP1 P3:

<script>
     Sys.Application.add_load(function() {
          $('div[id*="' + 19686 + '"]').change(function() {
               alert('dropdown test');
          });
     });     
</script>

Yes, with "Sys.Application.add_load" works.

 

Any ideas how to make this work with radiobutton one?

Change div to input.

That helped, thanks!

Anytime

Hi Ilya,

 

How do we alert for a specific value selected from the Dropdown list.

 

The following code alerts for any change in the dropdown list.

$('div[id*="' + 19686 + '"]').change(function() {

alert("Hello");

}

I wanted to combine change function with selected option.