Skip to main content

how to hide button after click on button



  • Anvita Rastogi

    Hi Abhijeet

    When you refresh the page, the element Add Action will appear. Javascript for Pre-Action: Using the Snippet code. You can make the button hide.

    <Action Type="RefreshElement" ElementID="div" ID="new">
    <Action Type="PreActionJavascript" ID="actToggleHideMe" Javascript="var x = document.getElementById(&quot;new&quot;);&#xD;&#xA; if ( === &quot;none&quot;) {&#xD;&#xA; = &quot;block&quot;;&#xD;&#xA; } else {&#xD;&#xA; = &quot;none&quot;;&#xD;&#xA; }" />
  • Glyn McKenna

    Hi Abhijeet,

    In addition to adding a Pre-Action script element as suggested by Anvita, the Action Refresh element also has a Post Refresh JavaScript attribute, where you can call a JavaScript named function or add a code snippet. Either way will work, so it just comes down to your specific requirements and whether you want it to be hidden before the refresh or after


    <EventHandler DhtmlEvent="onchange">
    <Action Type="RefreshElement" ElementID="dash01" ID="actRefDash" PostRefreshJavascript="//you can also add your JavaScript snippet here" />

    In this case you don't need to use javascript at all.  The Action.RefreshElement has two attributes which designate elements to hide or show upon refresh.

  • abhijeet

    after applying these properties not showing element always its just pup up and hide



    Oddly it looks like Logi has the two properties switched.  This was an issue way back when this property was introduced.  I would have thought they had fixed it by now.  Try putting the ElementID in the Feedback Show Element ID

    <Report ID="LogiForum.hidebuttonAfterRefresh">
    <Button ID="btnRefresh" Caption="Refresh">
    <Action Type="RefreshElement" ElementID="divRefresh" ID="areRefresh" FeedbackShowElementID="btnRefresh" />
    <Division ID="divRefresh" HtmlDiv="True">
    <Label Caption="@Function.DateTime~" HtmlTag="h3" />
    <ideTestParams />
  • Glyn McKenna

    Thanks John, good pick up. I'll check it out too and raise a ticket

  • Johnny Stevens

    Glyn McKenna VISUI

    Here is the documentation for this element (took some doing to find it since the links from Studio no longer work):

    Documentation here -

    This indicates that these attributes are not confused or switched, but that they are poorly-named.

    As a side note, if Logi were to "fix" this, all of the customers who worked this out by using the opposite attribute (as you are recommending above) would have all of their existing content broken by the "fix", including almost every one of the reports I've built for 2 different organizations. This is likely why it has not been changed, but Logi could do a better job of documenting and/or describing the effects of these attributes.

  • abhijeet

    Thank you 😊


Please sign in to leave a comment.