To have a javascript function calling a screen action
1. Put a button on the webblack and hide it using css (style="display: none;")
2. Javascript function force the click action on that button when certain action is performed: $target.parents('.something').find('.otherthing').click();
But the click() seems not working.
Hi,
Have you made certain that the find() is obtaining your button? Have you tried writing the same, but with an Id selector instead of class?
$('#" + TheButtonYouWantToClick.Id + "').click();
Hi QIUYAN LI,
Try Using widget click action available under rich widgets
for more info go through this link https://www.outsystems.com/forums/discussion/27124/how-to-force-a-button-click-using-javascript/#Post99899
Regards,
Koushik
Make sure you are getting element to generate event. you can select element by id, class etc.
Thanks
The best way of calling a screen action on JS is with Fake Notify. To accomplish that follow this steps:
OsNotifyWidget('<FakeNotifyWidget>.Id', '<message>')
Marcelo
QIUYAN LI wrote:
do you have any error in console? Have you tryed this with a link instead of a button?
BR
Carlos Gonçalves wrote:
thank you for the reply.
No console error.
And I have doubled check that I am able to click on the button, but not stop at the debugging point inside the screen action.
It is a link <a>.
Do I need to return any Notify?