Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iframes in absolute positioned divs

Status
Not open for further replies.

joachims

Technical User
Joined
Dec 21, 2004
Messages
1
Location
DE
Hi there,

I need to have an iframe in an absolute positioned div with another absolute positioned div with form inputs in front of it. In Mozilla I have the effect, that the cursor in the input field is obscured, in IE no input is possible at all!

Does anyone know the problem and - better - a solution?

Joachim

P.S: here is my example code:

Code:
<html>
<head>
<style>
#xframe { position:absolute; visibility:hidden; border:1px solid black; left:100; top:110; width:400; align:center; z-index:2; }
#xiframe { x-visibility:hidden; }
#xinput { position:absolute; visibility:visible; border:1px solid black; left:100; top:100; width:400; align:center; z-index:1; }
</style>

<script language="JavaScript" type="text/javascript">
function sw_divs(div1, div2) {
  document.getElementById(div1).style.visibility='visible';
  document.getElementById(div2).style.visibility='hidden';
}
</script>

</head>
<body>

<div id="xframe">
  <a href="javascript:void(0)" onclick="sw_divs('xinput', 'xframe');">Input</a><br>
  <iframe FRAMEBORDER="1" BORDER="0" width="300" height="300" src="[URL unfurl="true"]http://heise.de/"[/URL] scrolling="yes" id="xiframe"></iframe>
</div>

<div id="xinput">
  <a href="javascript:void(0)" onclick="sw_divs('xframe', 'xinput');">Frame</a><br>
  <form><input></form>
</div>

</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top