• Sekhar Babu K 6
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

 

Hi, 
I wanted to get rid of Private Check box on the notes & attachments section, As this list is not customizable i know that it can be hidden on the UI using javascript by entering the DOM of the page.
For this I created a home page component - html area - narrow left and added the following js code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>  
<script type="text/javascript">
<script type="text/javascript">
function hidePrvChkbx() {
    if(document.getElementById('IsPrivate')!=null) {
       document.getElementById('IsPrivate').diabled='true';
    }
}
window.onload = function() {
    window.setTimeout(hidePrvChkbx,0);
}
</script>
 


And added this to the home page layout, And that is working fine.
 
The problem is, We have another JavaScript component called - PostcodeAnywhere which helps in finding the postcode. This is getting affected by the above code.
Out of my research I noticed that, Even Postcode JS is using Window.Onload function to transeverse through the DOM. And I have another onload() function in my code. Which to my knowledge seems to be they both are conflicting.
 
Is there any other Event Objcet that I can make use of to execute my piece of code in JavaScript without affecting the Postcode finder??
Postcode anywhere is a Managed pakcage.. FYI..!!
 
Would really be a great help if this could be solved.
Thanks in advance


Ven