Iframe highly adaptive framework for the realization of

Related Tags:

  Iframe framework to resolve the problem pages highly adaptive code below, it should be noted that the framework must be set up pages quoted attribute name, otherwise they will not come into effect 

  Option 1: 

  <iframe Src="test.asp" width="100%" frameborder="0" scrolling="no" name="hj" id="hj"> </ iframe> 

  Test.asp head pages increased as follows JS code 

  <SCRIPT LANGUAGE="JavaScript"> 

  Function f_frameStyleResize (targObj) ( 

  Var targWin = targObj.parent.document.all [targObj.name]; 

  If (targWin! = Null) ( 

  Var HeightValue = targObj.document.body.scrollHeight 

  If (HeightValue <600) (600) = HeightValue 

  TargWin.style.pixelHeight = HeightValue; 

  ) 

  ) 

  Function f_iframeResize () ( 

  BLoadComplete = true; f_frameStyleResize (self); 

  ) 

  Var bLoadComplete = false; 

  Window.onload = f_iframeResize; 

  </ SCRIPT> 

  -------------------------------------------------- -- 

  Option 2: backup 

  Home of increase in the following code JS 

  <script Type="text/javascript"> 
  Var iframeids = [ "myblog"] 
  Var iframehide = "yes" 
  Function dyniframesize () 
  ( 
  Var dyniframe = new Array () 
  For (i = 0; i <iframeids.length; i) 
  ( 
  If (document.getElementById) 
  ( 
  Dyniframe [dyniframe.length] = document.getElementById (iframeids [i]); 
  If (dyniframe [i] & &! Window.opera) 
  ( 
  Dyniframe [i]. Style.display = "block" 
  If (dyniframe [i]. ContentDocument & dyniframe [i]. ContentDocument.body.offsetHeight) 
  Dyniframe [i]. Dyniframe Height = [i]. ContentDocument.body.offsetHeight; 
  Else if (dyniframe [i]. Document & dyniframe [i]. Document.body.scrollHeight) 
  Dyniframe [i]. Dyniframe height = [i]. Document.body.scrollHeight; 
  ) 
  ) 
  If ((document.all | | document.getElementById) & & iframehide == "no") 
  ( 
  Var tempobj = document.all? Document.all [iframeids [i]: document.getElementById (iframeids [i]) 
  Tempobj.style.display = "block" 
  ) 
  ) 
  ) 

  If (window.addEventListener) 
  Window.addEventListener ( "load" dyniframesize, false) 
  Else if (window.attachEvent) 
  Window.attachEvent ( "onload" dyniframesize) 
  Else 
  Window.onload = dyniframesize 

  </ Script> 

  Invoke a cross-border authority, pending further study 

  Iframe pages dynamic content div If achieved, adaptive highly unstable change table means to solve problems 

Related articles:

DIV + CSS layout examples entry (directory)
  This example through five steps, the basic formation of the following results pages.    We can read and detailed hands-test the entire process of this example:    1, page layout and overall planning concept art form effect maps and page separated, forming DIV structure, ...
Ajax applications and source download demo
  In Dodo which saw very useful information, 70 Ajax popular download source and application demonstration include: Greybox, Lightbox, Thickbox, rich in content, the study and research is invaluable information ah, a lot of things can be directly used to use, and give full play to the time used...
Fireworks animation basic types
  Fireworks in Gif animation production and processing has its unique power and convenient and flexible, its built-in instructions to generate relatively simple form of animation, can be roughly divided into two categories: First, the basic sports, and the second is movement effects category, ...
Dreamweaver multi-resolution positioning
  1, first of all, you need to download a boost www.macromedia.com website called CenterLayers 2.3 plug-ins (before the first download on the web site registration), 8 KB in size (you can through our site message demanded that the plug-ins !).    Then Exention Manager plug-ins will be...
HTML + CSS achieve rectangular fillet (without picture) - copied from GTalk
  GTalk template from the css to pull out in the NEE: P    Reason is actually very simple, and erected rectangular fillet height of 4, then on to the next followed by the (unit px, the frame is given by the width and color are 1 px maintain consistency):    Height of 1, p...