+ Start a Discussion
Vandana Rattan 4Vandana Rattan 4 

Visualforce page close button

Is it possible to add Close button just like aClose button on any browser window (X on top right) in Visualforce page?

Try this

      <apex:commandbutton onClick="window.top.close();" value="Close"  style="margin-left:95%;"/>

you can set sidebar or showheader value to False according to your requirement
David Taber 1David Taber 1
Doesn't work in Lightning, at least in Firefox.