RunJavascript and Feedback_AjaxWait

I cannot get both widget and server action to work.


I declared a javascript function SayHi(){alert('say hi');} in my web screen.

In the button server action, i used the RunJavascript server action with the following code "SayHi();" and i also added a Feedback_AjaxWait widget. Both didnt run. Any idea what happened?

Hi Newbie,

Please, could you share the .oml of it? or you can debug it for the problem.


Regards,

Amreen

Hi, I am unable to share the .oml. Will screenshot suffice?

Incidentally, when i tried to produce the screenshot for the post, the javascript runs well now.

But the Feedback_AjaxWait still does not show up. How can I invoke that widget?

Hi. 

Without digging to much into the Feedback_AjaxWait logic, I think the best way to make the AjaxWait to show up is to use JS to change the inline-property "display: none;".

To the button that is using the SayHiI() function, you should add an onmouseup event to display the widget (because it is triggered right before the onclick) and at the end of your server action, use another RunJavascriptAction to hide the widget again



"$('.Feedback_AjaxWait').css('display','block')"
"$('.Feedback_AjaxWait').css('display','none')"