Ajax (1) Apex Class (12) Apex Trigger (2) Community (2) Home Page (1) HTML (4) Integration (3) JS (7) KB (1) Label (1) Licenses (1) Listing (1) Log (1) OOPs (5) Sharing (1) Static Resource (1) Test Class (3) URI (1) Visualforce (10)

Wednesday 20 August 2014

Hide iframe element with id

<script>  function myFunction()  {  //alert("Page is loaded");  var iframe = document.getElementById('myFrame');  var frameDoc = (iframe.contentDocument || iframe.contentWindow.document);   frameDoc.getElementById('j_id0:SiteTemplate:j_id16:j_id17:j_id25:j_id26:j_id259').style.display = 'none';   //frameDoc.getElementById('j_id0:SiteTemplate:j_id16:j_id17:j_id25:j_id26:j_id67').style.display = 'none';      //alert("Page is loadedagain ");  }  </script>

    
<body onload="myFunction()">            <iframe id="myFrame" src="http://fullsb-aurea.cs16.force.com/internal/articles/en_US/Article/{!pkbCon.theKad.urlName}?l=en_US&fs=Search&pn=1" width="800" height="1000" ></iframe>                     </body>



No comments:

Post a Comment