How to call an action on hover (Web App)?

Hi All,

Currently, I'm fetching information for my entered value in a text value, on hover. The information is stored and displayed in the tooltip. I'm using the method where an invisible button is clicked and action is called whenever I hover over the field.

However, it is causing some performance delay as I have multiple fields. Is there a way to call the action directly without using an invisible button with an action?

Thanks in advance for the help!

coder kamath wrote:

Use on hover Directly in Extended properties.

You can see how to add it in this guide

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/JavaScript/Extend_Your_Web_Application_Using_JavaScript/Define_and_Run_JavaScript_Code


Hi Kamath,

I am currently using it in extended properties, as you have mentioned. But I am pointing this onhover to the invisible button to be able to use it to call the action, by clicking it whenever I hover over. 

I'm asking if there's a way to not click the button to call the action..

Thanks.

Rachael Lau wrote:

coder kamath wrote:

Use on hover Directly in Extended properties.

You can see how to add it in this guide

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/JavaScript/Extend_Your_Web_Application_Using_JavaScript/Define_and_Run_JavaScript_Code


Hi Kamath,

I am currently using it in extended properties, as you have mentioned. But I am pointing this onhover to the invisible button to be able to use it to call the action, by clicking it whenever I hover over. 

I'm asking if there's a way to not click the button to call the action..

Thanks.

The button actually is calling submit method for Normal submit and outsystem's custom OsAjax method for Ajax type of submits in the background.


So Instead of using the button you can call these methods Directly in your expression.


For Normal Submit use

onmouseover=document.getElementById("YourformName").submit();

For Ajax Submit use

onmouseover="OsAjax(arguments[0] || window.event,'the input name here','the input id here','Change','__OSVSTATE,','');"

The input name is the same as the input id but with "$" instead of "_"]


If you want I can try and attach a sample here.

Please try and let me know if this worked for you