Forum Moderators: open
I have 2 links that loads 2 diferent pages in an iframe. The page loaded by the first link needs scrolling in the iframe, while the second page doesn't. I know this can be solved reloading the main page when clicking the link, but this is not possible, so I thought that it may be some javascript trick that cand disable the iframe's scrolling when a link is clicked.
I already tried changing the iframe's css style with javascrip (overflow: hidden¦visible) but it does not works.
Ideeas, anyone?
Thanks
I've tried to build this code, but it doesn't works:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript" type="text/javascript">
function f1()
{ document.getElementById('coolid').scrolling="no"; }
function f2()
{ document.getElementById('coolid').scrolling="yes"; }
</script>
</head>
<body>
<input type="button" value="NO" onClick="f1();">
<input type="button" value="YES" onClick="f2();">
<iframe id="coolid" src="http://www.google.com/"></iframe>
</body>
</html>
Now, where's the mistake?