HTML frames example - html

Will this work?
<html>
<body>
<center>
<frameset rows="50%,50%">
<frame src="images.html">
<frameset>
<form action="abc.html">
<input type="submit" name="abc page" value="abc page">
</form>
</frameset>
</frameset>
</center>
</body>
</html>
Can I give the code as above, like giving a html link page in a frame, and in other frame, a HTML code.

Yes You can. The <frameset> tag defines a frameset.
The <frameset> element holds one or more elements. Each element can hold a separate document.

<frameset> and <frame> are both deprecated. Avoid using them.
Use an <iframe> instead.
Here's an example: http://jsfiddle.net/kqo9yhk5/
HTML:
<iframe src="http://jsfiddle.net/" frameborder="0"></iframe>

Related

How do I open a reference in another frame

I have a frame set with 2 frames.
<html>
<head>
</head>
<frameset cols="10%,*">
<frame src="Meniu.html">
<frame src="Secundar.html">
</frameset>
</html>
The output is this:
Frames
When I click on one of the references from the left frame, it opens in the same small frame, but how do I make to open the reference in the right frame, the bigger frame?
Disclaimer: <frameset> and <frame> are obsolete and do not work well in web-browsers at all. I can only conclude you're learning how to write HTML from a book published before 1997 - or you're a cruel sadist.
With that out of the way: Use the target="" attribute on your <a> and <form> elements to specify the <frame> by its name="" attribute.

Frames not working in HTML5

I have a task to do and I know that I should not be using frames but I have to. I tried to load 3 html pages into 3 frames on the main page but it's showing absolutely nothing at all. This is the code:
<body>
<h4>BGJUG - Bulgarian Java User Group</h4>
<div class="menu">
ABOUT EVENTS CONTACTS SEARCH
<hr width="90%" />
</div>
<frameset cols="25%,50%,25%">
<frame src="a.html">
<frame src="b.html">
<frame src="c.html">
</frameset>
</body>
The <frameset> tag is not supported in HTML5. You will need to change your DOCTYPE to one that supports frames. Try this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
Also, see the comment by t.niese about framesets being direct children of <html>.
Alternatively, if you need the HTML5 features, you can accomplish the same thing with <iframe>. inside CSS boxes. Scrolling of <iframe> is also not supported in HTML5 but you can probably put the <iframe> tags in CSS boxes with overflow: scroll;. See the other comment by t.niese below this answer.

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 replace frameset and frame in html5?

I am designing a web page. Latest is HTML5 . So I want alternate to frameset. I have frameset as,
<frameset rows="75%,25%">
<frameset cols="20%,80%">
<frame src=<%=url%> name="left" />
<frame src=<%=ur%> name="top" />
</frameset>
<frame src=<%=u%> name="bottom"/>
</frameset>
I replaced for <iframe> as,
<iframe class="menu" src="newtag.html" onload="this.width=screen.width;this.height=screen.height;"></iframe>
here newtag.html is the previous html file which used <frameset>. My question is, is it good practice? is there any other good way in html5? if it is there please tell me how.? Thank you.
No, it isn't a very nice practice to perform...
instead you could try, content place holders as in asp or something like that

What is wrong with this frameset code?

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.