Skip to Content
Author's profile photo Former Member

Hiding the Save button from the HTML interface with Javascript

Hi All,

I´ve been posting about the use of Javascript inserted in a WEBI document.

To insert Javascript code into a webi document just drop a blank cell onto your report, copy the code to it and set its “Read content as” property to “HTML”.

In this  blog post I´ll show how to hide a button from the interface, in this case, the Save button.

I´m still working on the general guidelines of scripting WEBI through Javascript but I´m trying to publish as soon as a find out something interesting.

This code will hide the Save button (and its colleague, the “Save as”) :



{if  ((wi[i].actionId !== null)&&(wi[i].actionId!== undefined))




This is , shortly how it works,[2].window[0] is webiViewFrame, the HTML window of the document,[2].window[0]._widgets;

will get, into wi the list of the widgets of the window (the widgets are, mostly, interactive objects of the interface (like buttons, tabs, etc..)

next step is  to transverse the list looking for the Save button , when it´s found, we set the hidden attribute of its html element.

This was tested in SAP BO 4.1 SP5.



Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Hayden Gill
      Hayden Gill

      In WebI 4.1/4.2 you can remove a user's ability to hit the 'Design' button.  As it's a right applied to a user/group the restriction applies to all documents a user opens.

      At the time of writing, there isn't a way to apply this restriction to a folder/document.

      Using the same approach as Rogerio describes above, if you want to hide the 'Design' button for a report, you can using the following javascript.

         parent.document.querySelector('[aria-label="Design"]').style.display = 'none';
         parent.document.querySelector('[aria-label="Click here to access Design options"]').style.display = 'none';