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
Related
The layout i want to make
I dont know how to get the frames to layout in the right position I want, so I could use help.
That is done using frameset. I have added frameborder="1"which will show the border, you can set it to "0" or remove the borders. You can change the border size by adding border="1px". And add bordercolor:#000; for adding colors to the border. And for scrolling you can use scrolling="Yes/No/Auto" in the frameset beggining tag.The code given below will not work on Stack Overflow, Codepen,or JSFiddle as <frameset> is no longer supported in HTML5. But you can save the file locally or try it on W3Schools by pasting the following code, and it will work.Edit the frame sources, else it will not work (as I have given invald pages).
<html>
<frameset frameborder="1" rows="20%, 80%"><!--set frameborder value "0" for hiding the borders -->
<frame src="https://via.placeholder.com/1000X150/181818/FFFFFF/?text=20%">
<frameset cols="25%, 75%">
<frame src="https://via.placeholder.com/150X500/181818/FFFFFF/?text=25%">
<frameset rows="50%, 50%">
<frame src="https://via.placeholder.com/700X250/181818/FFFFFF/?text=75%">
<frameset cols="75%, 25%">
<frame src="https://via.placeholder.com/600X200/181818/FFFFFF/?text=50%">
<frame src="https://via.placeholder.com/200/181818/FFFFFF/?text=25%">
</frameset>
</html>
http://www.sandyscastles.net/mlsalt.html
I want to use this iframe on a new site (getting rid of this one). I inspect the element in Chrome... but can't get the iframe to work... I must not be looking at the right source.
Can someone write me a clear explanation of how to find this code?
are you trying to replace iframe?
This is the code your page have.
<frameset rows="116,*" cols="*" frameborder="NO" border="1" framespacing="0">
<frame src="mls2.html" name="topframe" scrolling="NO" noresize="">
<frame src="http://elko.fnismls.com/idx/idx.aspx?Mls=ELKO&Subscriber=bfad323f-3818-41b4-a951-8e2700f75a33&MLSSearch=1" name="body" scrolling="no" noresize="">
</frameset>
I'm using a using this jquery dropdown menu in my banner frame (mail_frame.html). when it drops down it gets covered by another frame that's below it. even though i set the z-index of the drop down to 999 in it's css, it's still behind the other frame
frameset.jsp
</head>
<frameset id="frameMain" rows="84,*" framespacing="0">
<frame src="mail_frame.html" id="mail" name="mail" frameborder="0" border="0" marginwidth="0" marginheight="0" noresize="noresize" scrolling="no"/>
<frameset id="frameSet" cols="126,*" framespacing="0">
<frame src="leftNavigation.do?loadWelcome=true<%= currentURL %>" id="leftnav" name="leftnav" frameborder="0" border="0" marginwidth="0" marginheight="0" noresize="noresize" scrolling="no"/>
<frame src="empty.htm" id="main" name="main" frameborder="0" border="0" noresize="noresize" scrolling="yes"/>
</frameset>
</frameset>
</html>
how can i make it drop down on top of everything
Classic frames (what you're using) are completely independent windows. You can't have an element in one frame that then extends over the content of another frame. You can do that with iframes, but not with the kind you're using.
It may be time to consider moving to a frameless layout, as that's the direction the technology seems to be going. For instance, neither frame nor frameset is part of HTML5. As an alternative, you can use ajax (an increasingly outdated name, as I suspect most people are using it with JSON instead of XML now) to update individual elements within a page.
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.
I have the following code for framset display
<FRAMESET ROWS="18%,*" >
<FRAME SRC="./views/Title_Page.html" NAME=TITLE SCROLLING=NO MARGINHEIGHT=1 noresize="noresize">
<FRAMESET COLS="20%,*">
<FRAME SRC="./views/Navigation_Page.jsp" NAME=SIDEBAR noresize="noresize" scrolling="no">
<FRAME SRC="./views/Welcome.html" NAME=MAIN noresize="noresize">
</FRAMESET>
<NOFRAMES>NOFRAMES stuff
</NOFRAMES>
</FRAMESET>
I want to add a logout link which logges out of the app ,when i add a link in Title_Page.html it logges out only that frame but not the others,how will handle it?i want to log out completly from all the frames
I must preface by saying that frames are pretty much frowned upon on the web these days. They're deprecated, they're not a good user experience, it's very difficult to link or bookmark a page, etc etc...
Add target="_top" to your logout link. It will target the "top" page (the one which defines all the frames). Also note that target is deprecated.
target="_top"
… same as anything else you want to hit the top window instead of the current frame.