View Full Version : How to expand iframe or Frameset onMouseOver?
expertboy
05-25-2010, 03:17 PM
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%).
Erik_M
05-25-2010, 03:32 PM
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/index?qid=20100511123228AAkhUy8
expertboy
05-27-2010, 12:45 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.