Hi sarar,
I see this is your first post. Welcome to the Servoy forum
I assume you want to call a method from another form from your button?
Any event on a form (be it a form event or an event on a form element) can only be linked to it's own form method, global method or a foundset method (the foundset used on the form).
So if you try to link a method from another form to your custom button then this won't work.
As a workaround you can create a form method on your form that triggers the other form method like so:
- Code: Select all
_method = _jsForm.newMethod("function() {forms['" + _formname + "']['" +_methodname + "'];}")
_button = _jsForm.newButton("",_x,_y,_c_width_button,_height,_method)
So as you can see the form method that is being created is calling your other form's method by code.
Hope this helps.
Don't hesitate to ask any questions if things are not clear.