0

I am new in Extjs and I just had an issue with a fileuploadfield, basically what I want to do is to trigger an new event after clicking the browse button. I want to trigger both event. The one by default and the new event I am going to develop. Is there any way of doing that ?

1
  • Welcome to Stack Overflow. Please show your latest non-working attempt at solving this problem. It is usually more instructive to see fixes to your code than to read someone else's solution. See stackoverflow.com/help/how-to-ask Commented Feb 26, 2018 at 4:25

1 Answer 1

1

After render of the file upload field, you want to attach to the trigger component's click event like this:

listeners: {
    afterrender: function(field) {
        field.getTrigger('filebutton').component.on('click', function() {
            Ext.Msg.alert('Browse button clicked');
        });
    }
}

https://fiddle.sencha.com/#view/editor&fiddle/2dn5

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, that is exactly what I wanted. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.