I have the following Javascript code embedded in my side row
window.onload = new function()
{
hideBtns();
}
function hideBtns()
{
if(document.getElementsByName('edit')[0]!=null){
document.getElementsByName('edit')[0].style.display = 'none';}
if(document.getElementsByName('edit')[1]!=null){
document.getElementsByName('edit')[1].style.display = 'none';}
}
Inspecting the edit button in chrome o/p :
<input value=" Edit " class="btn" title="Edit" name="edit" onclick="navigateToUrl('/001d000000JXhAX/e?retURL=%2F001d000000JXhAX','DETAIL','edit');" type="button">
The script is being called , though I see that the name of the "Edit" button is "edit" when I inspect it is not entering the if(document.getElementsByName('edit')[0]!=null){ block !!!
Any pointers will be a great help!!!