Web Analytics Made Easy -
StatCounter control iframe properties~ - CodingForum

Announcement

Collapse
No announcement yet.

control iframe properties~

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • control iframe properties~

    howdy~

    I want JavaScript control iframe properties and the page nested, for example i'd like to switch visibility of iframe by clicking somewhat checkbox, how to achieve that plz ???
    Never end on learning~

  • #2
    set the css display property to none

    <iframe id="ifr" src="page.htm" style="display:none"></iframe>

    then toggle its value to inline/none to display/hide as the checkbox is checked/unchecked.
    i.e.
    document.getElementById("ifr").style.display='inline';
    Glenn
    vBulletin Mods That Rock!

    Comment


    • #3
      Originally posted by glenngv
      set the css display property to none

      <iframe id="ifr" src="page.htm" style="display:none"></iframe>

      then toggle its value to inline/none to display/hide as the checkbox is checked/unchecked.
      i.e.
      document.getElementById("ifr").style.display='inline';
      thanx, can that display control whether the iframe be hidden or not ?
      and what values can i take from the visibility property ?
      Last edited by black; Feb 12, 2004, 05:49 AM.
      Never end on learning~

      Comment


      • #4
        I said display property not visibility although they are similar. display does not occupy space when set to "none", while visibility still occupies the space even when set to "hidden".
        Glenn
        vBulletin Mods That Rock!

        Comment


        • #5
          Originally posted by glenngv
          I said display property not visibility although they are similar. display does not occupy space when set to "none", while visibility still occupies the space even when set to "hidden".
          thanx again man~

          and what about the value if i want visibility shown ? is that "shown" or "unhidden" or anything else ?
          Never end on learning~

          Comment


          • #6
            visible

            why don't you want the display property?
            Glenn
            vBulletin Mods That Rock!

            Comment


            • #7
              Originally posted by glenngv
              visible

              why don't you want the display property?
              frankly, i dont konw how to use display... lol i search w3c site but find no reference on that...
              Never end on learning~

              Comment


              • #8
                I already told you how to use it, didn't I?

                Originally posted by glenngv
                set the css display property to none

                <iframe id="ifr" src="page.htm" style="display:none"></iframe>

                then toggle its value to inline/none to display/hide as the checkbox is checked/unchecked.
                i.e.
                document.getElementById("ifr").style.display='inline';
                Glenn
                vBulletin Mods That Rock!

                Comment


                • #9
                  Originally posted by black
                  frankly, i dont konw how to use display... lol i search w3c site but find no reference on that...
                  Display

                  Visibility

                  Comment


                  • #10
                    Hey, I would find anouther way then using an IFRAME to display your data. Search google for alternatives and you'll find a few. I say this because I've been working on a page with one on it and IFRAME is not a good choice if you want it to work in multiple browsers. Firefox does not support it as I know. Just a heads up if you want to reach the most users.

                    Comment


                    • #11
                      thanx guys. i think now i got more sense for iframe, thanx...
                      Never end on learning~

                      Comment

                      Working...
                      X