Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hide/Remove Button from Salesforce detail page

    Hi,

    I am working on Salesforce.com application and want to have a standard button named "Save and Send Update" placed on Event object detail page to be hidden.

    I followed some sample codes shown on net utilising style.visibility/style.display attributes of Javascript. However, I am not able to still remove/hide the standard button.

    If anyone could please assist me in this, that would be great!


    Thanks,

    Vimal

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,303
    Thanks
    203
    Thanked 2,562 Times in 2,540 Posts
    You do not say what will cause the button to show/hide, but this should move you forward:-

    Code:
    <div id = "mydiv" style="display:none">
    <input type = "button" value = "Save and Send Update">
    </div>
    <br><br>
    
    <input type = "button" value = "Show/Hide Update Button" onclick = "toggle()" >
    
    <script type="text/javascript">
    function toggle() {
    var Style = document.getElementById("mydiv").style;
    Style.display = (Style.display == "none") ? "block" : "none";
    }
    </script>
    If you wish that the hidden button still occupies the same position on the page use instead:-

    Code:
    <div id = "mydiv" style="visibility:hidden">
    and change the script to
    Style.visibility = (Style.visibility == "hidden") ? "visible" : "hidden";
    I heard him then, for I had just
    Completed my design
    To keep the Menai Bridge from rust
    By boiling it in wine.
    - Lewis Carroll
    Last edited by Philip M; 09-23-2010 at 10:18 AM.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •