tags:

views:

40

answers:

2

How can I modify this frames so that users can not move those frames?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd"&gt;
<html>
<head>
<title></title>
</head>
    <frameset border="1" rows="100, 200"  >
      <frame src="page1.html">
      <frameset border="1" cols="20%, 80%" >
        <frame  src="page2.html">
        <frame src="page3.html">
      </frameset>      
  </frameset>
</html>
+2  A: 

You can use the noresize attribute to disable it:

<frameset border="1" rows="100, 200"  >
  <frame src="page1.html" noresize>
  <frameset border="1" cols="20%, 80%" >
    <frame  src="page2.html" noresize>
    <frame src="page3.html" noresize>
  </frameset>      
</frameset>
Nick Craver
A: 

I second what Nick said, but would just like to add that I think it should be one of the following:

noresize="true"
noresize="noresize"

I am not sure which one it is, but I know the attribute "nowrap" uses "nowrap" for the value too, instead of true. Can someone please confirm which of the above options applies here?

Also do you have to use frames? I notice you are loading pages in each one. If you create them as divs, you can use most server side languages to load pages into the divs. For example:

  • In ASP.Net you are able to do this - but unfortunately I do not have the code for this available right now. There is a way to process a page within a page.
  • In PHP you can use the include command (include "page1.htm";). PHP is much simpler in my opinion.
ClarkeyBoy
In HTML, Boolean attributes always have identical names and values, but the recommended approach is to only provide the value (i.e. `noresize` and not `noresize="noresize"`). http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.4
David Dorward
I was advised this was wrong last year (when I was working for a county council with a highly trained web team). They said that to ensure it works across all browsers / platforms you should use (in my case) nowrap="nowrap".
ClarkeyBoy
Whichever way it should be - would it be that bad to specify noresize noresize="noresize" (i.e. specifying both techniques)?
ClarkeyBoy
Practically? Not really, the advice is old and the browsers to which it applied have faded into insignificance. Claiming that using the full version is better supported than the short is utter rubbish though, it sounds like this county council's highly trained web team have been smoking too much XML.
David Dorward