Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#793878
When I set multiple event handlers on a single input field, only the first handler get fired, the others doesn't.
Any suggestion to handle this issue?

Code: Select all
fieldRef.setOnchange(function() {
    console.log('First event handler');

    if (radioRef.getValue() == OPTION_HIDDEN) {
        radioRef.addClass(CLASS_RADIO_REQUIRED);
        return false;
    } else {
        return true;
    }
});

fieldRef.setOnchange(function() {
    console.log('Second event handler');
});
Output:
Code: Select all
First event handler
[/size]
#793948
You can always combine your code. However, if you really need two separate events, then use the jQuery change() method like this:
Code: Select all
$("#myfield").setOnchange(function(newVal, oldVal) {
  alert("setOnchange: "+newVal);
});

$("#myfield").getControl().change(function() {
  alert("change: "+ $(this).val() );
});

I have a suggest where user have to select some do[…]

The 500 Internal Server Error is the general catch[…]

Really very nice blog information for this one and[…]

This is a long, lengthy and cumbersome process. T[…]