Results 1 to 3 of 3

Thread: How to expand iframe or Frameset onMouseOver?

  1. #1
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to expand iframe or Frameset onMouseOver?

    i create personal website which has two vertical Frames and frames have two different links so, i wana know how to expand iframe or Frameset onMouseOver?

    i wana code when i mouseover on left frame then right frame automatically collapse(width=20%) and when i mouseover on right frame then left frame automatically collapse(20%).

  2. #2
    Join Date
    May 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try
    <script type='text/javascript'>

    var _gotdata ;

    function mouseover()
    {
    _gotdata = document.getElementById( "iframe" )
    _gotdata.style.width = 100%;
    _gotdata.style.height = 120%;
    _gotdata = document.getElementById( "iframe2" )
    _gotdata.style.width = 100%;
    _gotdata.style.height = 80%;
    }

    function mouseout()
    {
    _gotdata = document.getElementById( "iframe" )
    _gotdata.style.width = 100%;
    _gotdata.style.height =80%;
    _gotdata = document.getElementById( "iframe2" )
    _gotdata.style.width = 100%;
    _gotdata.style.height =120%;
    }

    </script>

    <iframe style='width:200px;height:200px' src='http://google.com' onmouseover='mouseover()' onmouseout='mouseout()' id='iframe'></iframe>
    But with several frames instead im not sure if you can just use the 20 % though.
    Taken from http://answers.yahoo.com/question/in...1123228AAkhUy8
    Last edited by Erik_M; 05-26-2010 at 08:44 PM.

  3. #3
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    without % sign it works.
    _gotdata.style.width = 100%;
    _gotdata.style.height = 120%;
    problem, when i mouseOver on any 1 frame they both expand at once.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •