Jump to content
GIGN Forum

Ipb


Bertuliinii
 Share

Recommended Posts

ar iframe arī var

uztaisi jaunu .js failu piemeeram f.js un iekopē iekšā šo:

function init_document_iframe() {

   if (document.getElementById('document_frame') != null) {
       document.getElementById('document_frame').onload = function() {

         var frameDoc = null;

         var frame = this;

         if (frame.contentDocument) {
           frameDoc = frame.contentDocument;
         } else {
           frameDoc = document.frames['document_frame'].document;
         }

         frame.style.height = (frameDoc.body.offsetHeight + 50) + 'px';

       }
   }

}

ieliec vinu @ head ( piemeeram forums.php )

<script type="text/javascript" language="javascript" src="/f.js"></script>

un tad liekot i frame norādi šādi:

<iframe src ="/forums"  width="xxx" border="0" frameborder='0' scrolling='no' id="document_frame" ></iframe>

un pēc iframe jaizsauc funkcija ( vnk nākamajā rindiņā aiz iframe ):

<script language="JavaScript"> init_document_iframe()</script>

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...