PDA

View Full Version : I have an iframe but it is not recognised apart of my Div.. any ideas


chris_angell
09-27-2002, 04:48 PM
ok, this is hard to explain,

I want a div to become visible.. people when on the div it stays visible and when you roll off the div it says to hide it,

which is all fine, but the problem I have got is in the div is an iframe, so as soon as you roll over the iframe within the div, the machine thinks you have rolled out of the div, is there anything I can to prevent this.. ??????

here is a a simple way to explain in a simple code way

<head>
function portfoliowatch(){
portfolioLyr.style.visibility="hidden"
}
</head>
<body>

<a onClick="portfolioLyr.style.visibility="visible">show division</a>

<div id="portfolio" onmouseout="portfoliowatch()">
<iframe NAME="portfolio" WIDTH="388" HEIGHT="283" src="page"></iframe>
</div>

eak
09-27-2002, 05:10 PM
when you mouseover the iframe inside the div, you are leaving the document that the div is in. to prevent the div from hiding, you should either hide the iframe and load the content from it dynamically into the div or have an onmouseover statement in the iframe tag that will show the div.

mjackson
09-27-2002, 05:34 PM
My problem had nothing to do with iframes. I have been trying to open a popup and keep it on top. I have tried literally about 10 different scripts. I just now used your generator to create a script...AND IT WORKED!!! I am sooooo happy :D . Thank you, thank you, thank you. You can view what I'm working on by clicking on http://www.sharonmorrowdesigns.com/sterling_silver_rings.htm

chris_angell
09-27-2002, 05:36 PM
yeah , tried this to place the mouseover in the iframe tag but .. it still does the same, I was thinking mabe put some ?? in the page that is held within the iframe, but I am ot to sure what ..

:confused: plop

eak
09-28-2002, 07:56 PM
chris_angell,
what did your code look like? i did this quick test and it works so i know that the onmouseover works.

<iframe src="about:blank" onmouseover="alert('hi');"></iframe>

whammy
09-29-2002, 01:37 AM
Now THAT is an interesting signature, eak. :o

adios
09-29-2002, 04:19 AM
<html>
<head>
<title>untitled</title>
<script type="text/javascript">

function portfoliowatch(lyr){
lyr.style.visibility = 'hidden';
}

</script>
</head>
<body>
<a href="javascript:portfolioLyr.style.visibility='visible';void(0)">show division</a>
<div id="portfolioLyr" style="visibility:hidden;" onmouseout="portfoliowatch(this)">
<iframe NAME="portfolio" WIDTH="388" HEIGHT="283" src="javascript:'<h4>Hi!</h4>'"></iframe>
</div>
</body>
</html>