Jump to content

[SOLVED] javascript/Iframe issues


efficacious

Recommended Posts

Hello everyone,

 

I'm currently using JS to create a "popup" window.. which is actully just a div that is positioned absolutley on the page..

 

The problem I'm having is that once the pop up occurs I trigger another JS function to write out an Iframe into the div.. but instead of just writing the Iframe rewrites the whole page to JUST be an Iframe...

 

heres the code i'm using:

<script type="text/javascript">
function ClearDay()
{
document.getElementById('Popper').style.visibility='hidden';
}

function openday(x)
{
document.getElementById("Popper").style.visibility="visible";
ThePage(x);
alert(x);
}
</script>

</head>
<body>
<table id='Popper' onclick='ClearDay();'>
<tr>
	<td>
		<div id='PopDay'>
			<script type="text/javascript">
			function ThePage(z)
			{
			document.write("<iframe src='checkday.php");
			document.write("?id="+z+"'"); 
			document.write("width='500px' height='500px'></iframe>");
			}
			</script>
		</div>
	</td>
</tr>	
</table>

 

thanks for the help everyone,

eff

Link to comment
https://forums.phpfreaks.com/topic/122369-solved-javascriptiframe-issues/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.