function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

The default iframe height is set to 200

<iframe id="01NS00000004LnV" width="100%" scrolling="no" height="200" frameborder="no" title="ABN SEARCH" name="01NS00000004LnV" marginwidth="0" marginheight="0">

i need only height = "145"

Any idea ?
Greg HGreg H
You'll need to tweak this depending on where you call the function from.  I presume you would place this code inside the sControl being called from inside the iframe?
parent.document.getElementById("01NS00000004LnV").style.height = "145px";
Hope this proves useful,
If this s-control is on your page layout, you can go to the page layout editor, double-click on the field, and type in the new value. This way, you don't need dynamic javascript to size it.
I try the page layout but it does not save the change.

Hello mba75,

You could also utilize this custom function to dynamically set the size of the iframe. You can use this function initiated in the body tag as an onload event. You will not need the scroll bar on this either. Please let me know if you have questions.

 function resizeIframe() {
  var thisWindow =;
   var iframes = parent.document.getElementsByName(thisWindow);
   if (iframes && iframes.length == 1) {
    var height = document.body.scrollHeight;
    iframes[0].style.height = height + "px";