Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. general html question

general html question

Scheduled Pinned Locked Moved ASP.NET
questionhtmllounge
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    umeshdaiya
    wrote on last edited by
    #1

    Hi All, I am working on site where I am using iframes for dynamic html files. Each html file having own length and my iframe height is fixed. How can I set auto height for each page coming in iframe?

    A A 2 Replies Last reply
    0
    • U umeshdaiya

      Hi All, I am working on site where I am using iframes for dynamic html files. Each html file having own length and my iframe height is fixed. How can I set auto height for each page coming in iframe?

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      Hi, Your question is nothing to do with ASP.NET. Better place of your question is Web Development Forum. Any way, you can achieve your requirment by using : document.body.scrollHeight and document.body.scrollWidth For your reference, please have a look http://www.expertsforge.com/Web-Development/setting-iframe-heightscrolling-attribute-dynamically-using-javascript-161.asp[^]

      1 Reply Last reply
      0
      • U umeshdaiya

        Hi All, I am working on site where I am using iframes for dynamic html files. Each html file having own length and my iframe height is fixed. How can I set auto height for each page coming in iframe?

        A Offline
        A Offline
        April Fans
        wrote on last edited by
        #3

        Hi,you can refer to: <iframe id="treeFrame" name="treeFrame" frameborder="0" scrolling="0" width="100%" src="Tree.jsp"> <iframe id="contentFrame" name="contentFrame" frameborder="0" scrolling="0" width="100%" src="content.jsp" stype="height:expression(1);aho:expression(autoResize())"> <script type="text/javascript"> function autoResize() { try{ var hr = contentFrame.document.body.scrollHeight; var hl = treeFrame.document.body.scrollHeight; var height = Math.max(hr,hl); document.all["contentFrame"].style.height = height; document.all["treeFrame"].style.height = height; } catch(e){} } </script>

        April Comm100 - Leading Live Chat Software Provider

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups