What is wrong with this frameset code? - html

I am using Webmin on my server. For some reason it's decided to stop displaying anything on the root page, it's completely blank. However it's still returning code, shown below. The individual pages in the frames work perfectly but the frameset just doesn't want to display, in any browser, for some reason.
I have stripped it right down to this, running on a local server but it still doesn't show anything:
<!DOCTYPE html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Title</title>
</head>
<body>
<frameset cols="230,*">
<frame name="left" src="test1.html" scrolling="auto">
<frame name="right" src="test2.html" noresize>
</frameset>
</body>
</html>
I've also tried removing and changing various attributes but no luck.

The <frameset> element replaces the <body> element. You can't use both in the same document.
You should write:
<!DOCTYPE html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Title</title>
</head>
<frameset cols="230, *">
<frame name="left" src="test1.html" scrolling="auto" />
<frame name="right" src="test2.html" noresize="noresize" />
</frameset>
</html>

Take out the <body></body> tag.

Related

Frameset do not work in rails 4.2

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title> ABC </title>
</head>
This is index.html.erb
<frameset rows="170,*" frameborder="0" border="0" framespacing="0">
<frame name="topNav" src="top_nav.html" />
</frameset>
</html>
My layout is false for this view. So, html, head is declared at this view only. Question is why does not this code work in erb files?
I see only "This is index.html.erb" message on the page.
I hope everyone know that
framesets
should not come under/after body.
Problem with above code was line:
This is index.html.erb
Browser was converting taking this body tags. Removed this line from code and framesets started to appear.

Multiple CGI scripts in an HTML frameset

I have multiple (3-4) CGI scripts which should be presented on one HTML page.
I tried this:
<html>
<head>
<title>Testing</title>
</head>
<body>
<h1>TESTPAGE<BR></h1>
<frameset cols="35%,20%,*">
<frame src="./cgi-bin/1.cgi">
<frame src="./cgi-bin/2.cgi">
<frame src="./cgi-bin/3.cgi">
</frameset>
</body>
</html>
Only TESTPAGE is shown, no cgi was opened.
Your HTML is invalid. A validator would have told you what the problem was.
You can't have a <frameset> inside a <body>. You use a <frameset> instead of a <body>.
When your browser encounters the <frameset>, it is already rendering a normal HTML body, so it ignores it because it has no place to put it.

How to make an HTML frame unmovable?

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">
<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>
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>
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.

Frameset not showing up in FireFox or IE. Fine in Chrome..?

For some reason, this very basic page shows up fine in Chrome, but not FireFox or IE. I've never really needed to use Frames before, but they seem simple enough. Is there a problem with using a single frame within a frameset? I am trying to replace an iFrame with this single frame.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
</head>
<body>
<frameset cols="*">
<frame id="aqFrameSlider" src="http://www.alphacommunications.com/alphaquote/index.php?account=J2001&hash=GISDFGSP43HAJ49FH92JSPKJ">
</frameset>
</body>
</html>
Remove <body> and close <frame> properly:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
</head>
<frameset cols="*">
<frame id="aqFrameSlider" src="http://www.alphacommunications.com/alphaquote/index.php?account=J2001&hash=GISP43HAJ49FH92JSPKJ"></frame>
</frameset>
</html>
The next time, you should validate your document first, that would notice this error.

Frameset isn't working in IE

First of all, why use a frame set in the first place you ask?
answer: Because my boss told me.
That been said, I have 2 files. Index.html and Head.html.
Contents of index.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Site Title</title>
</head>
<frameset rows="122,*" FRAMEBORDER=NO FRAMESPACING=2 BORDER=0>
<frame name="t" src="head.html" scrolling="no" marginheight="0" marginwidth="0">
<frame name="b" src="http://www.website.com">
</frameset>
<noframes>
<p>You have frames turned off on your browser, please turn it on and reload this page.</p>
</noframes>
</html>
Contents of head.html:
<div style="border-bottom:2px solid #000;height:120px">
<center>This is the frame head.</center>
</div>
The code works fine in all browsers except Internet Explorer 7 and 8 (I don't care about 6). Is there anything I am doing wrong, and if not then can the same effect be achieved without frames and if so how?
#ricebowl If you run the 2 pages you will see that the website trying to be framed does not show up at all in IE but does show up in all other browsers.
i tried in IE 7,it works well.i don't know exactly what is your problems。