
May 5th, 2005, 01:14 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 3
Time spent in forums: 38 m 10 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by Jr- Ok, I have asked EVERYwhere and looked at every no-name forum post on the net and NOone knows...
How can I make an iFrame increment or deincrement with an onClick event? I unfortunately know nothing about JavaScript other then the fact that I've seen this done on a <textarea> box. I just want one button to 'increase' the iFrame height and another to 'decrease' the height. |
Very simple stuff...
if you want to specify the height for the iFrame each time, using this..
Code:
<script language="javascript">
function changeframe()
{
var new_height = prompt ('enter the new height for the frame');
document.getElementById('myframe').height = new_height;
}
</script>
...
<iframe src="page.html" width="200" height="200" name="myframe"></iframe>
With this, if you want to make it any different you should be able to just alter the code
|