13
Views
3
Comments
Solved
Feedback Message Triggering a Screen Action
Question

I'm working with Reactive Web for Outsystems 11.

I want to be able to click on a warning feedback message and trigger a screen action.


What I did so far:

  1. I have a hidden link that is hidden with (style="display: none;") named Update_Button.
  2. An OnAfterValidateVersion client action that triggers the warning message followed up by a Javascript widget that executes this code:  

var warningmessage = document.getElementsByClassName("feedback-message feedback-message-warning")[0];
var button = document.getElementById("Update_Button.Id");
document.addEventListener("DOMContentLoaded", function () {
    warningmessage.onclick = button.click();
});


I also got the same results with this:


var warningmessage = document.getElementsByClassName("feedback-message feedback-message-warning")[0];
document.addEventListener("DOMContentLoaded", function () {
    warningmessage.onclick =  $('#" + Update_Button.Id + "').click();
});


The problem I'm facing is when I click the warning feedback message nothing happens. What am I doing wrong? 

Thanks for your time.

mvp_badge
MVP
Rank: #91
Solution

Hi Luis,

I have created a sample app based on your requirement, hope this helps you!

See the sample app

Refer this:  JavaScript_API/FeedbackMessage


Please find the attached .oml solution file.


Regards,

Benjith Sam

FBMsgReactiveTestApp.oml