X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Frame noResize Property

Frame/IFrame Object Reference Frame/IFrame Object

Definition and Usage

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

Internet Explorer Firefox Opera Google Chrome Safari

The noResize property is supported in all major browsers.


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 Reference Frame/IFrame Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook