+ Start a Discussion
mahemahe 

Javascript issues in S-control

Hi,

 

I wanted to hide custom button in standard objects detail page. So I did by implementing s-control and I made JavaScript code changes for it. Actually I can hide the button when the page first time loading but I count hide it when the refresh same page and its getting error out as following: 'window.parent.document.getElementsByName(...).0.style' is null or not an object.

 

var e=window.parent.document.getElementsByName("unreceive_deliverable1");
alert(" The count of button " + e.length);
e[0].style.display="none";

 

- unreceive_deliverable1 - is the button name

- I am getting count value is 1 when the page first time loading but getting 0 if I refresh the same page.

 

I am not sure where it is missing.  Please let me know if you have any question?

 

I appreciate if you could help me on this.

 

Thanks,

Mahendiran.

 

mahemahe

Any update on this.

 

Advance in thanks,

Mahendiran