Frame noResize Property
❮ Frame/IFrame ObjectDescription
The noResize property sets or returns the value of the noresize attribute in a frame element.
The noresize attribute specifies that a frame cannot be resized by the user.
Syntax
frameObject.noResize = true|false
Browser Support
Property | |||||
---|---|---|---|---|---|
noResize | Yes | Yes | Yes | Yes | Yes |
Example
Create a frameset with two frames. Each frame is set to 50% of the browser window:
<html>
<frameset cols="50%,50%">
<frame id="leftFrame" src="frame_noresize.htm">
<frame id="rightFrame" src="frame_a.htm">
</frameset>
</html>
The source code of "frame_noresize.htm" is as follows:
Example
<html>
<head>
<script>
function disableResize()
{
parent.document.getElementById("leftFrame").noResize = true
parent.document.getElementById("rightFrame").noResize = true
}
function enableResize()
{
parent.document.getElementById("leftFrame").noResize = false
parent.document.getElementById("rightFrame").noResize = false
}
</script>
</head>
<body>
<input type="button" onclick="disableResize()" value="No resize">
<input type="button" onclick="enableResize()" value="Resize">
</body>
</html>
Try it Yourself »
❮ Frame/IFrame Object