 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Archie
Joined: 27 Sep 2007 Posts: 2
|
Posted: Thu Sep 27, 2007 5:06 am Frames for beginners |
|
|
|
I'm a dimwit please bear with me. I need to use framesets to create a page with 2 frames, the left frame and the right frame <frameset COLS="20%,*">.
The left frame is a menu containing links to 3 php files. When each link is activated, the associated file should on the right frame. Below is script that needs correction. Please I need your help somebody. I'm lost without you. Thanks.
| Code: |
<HTML>
<HEAD>
<TITLE>WebServerMonitor</TITLE>
</HEAD>
<FRAMESET COLS="20%,*">
<FRAME SRC="Menu.html" NAME=left scrolling="NO" >
<UL>
<LI><A href="showpage.php#showpage" TARGET="left">showpage</A></LI>
<LI><A href="Showsping.php#showping" TARGET="left">showping</A></LI>
<LI><A href="Showspace.php#Showspace" TARGET="left">Showspace</A></LI>
</UL>
</FRAMESET>
<FRAME SRC="display.html" NAME=right scrolling="NO" >
<NOFRAMES>NOFRAMES stuff
</NOFRAMES>
</FRAMESET>
</FRAMESET>
</HTML>
|
 |
|
sticks464
Joined: 31 Dec 2006 Posts: 1117
|
Posted: Thu Sep 27, 2007 6:17 am |
|
|
|
Your going about it the wrong way. You can't put the menu on this page. Here's what you need for this page;
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Home</title>
</head>
<frameset cols="20%,*">
<frame src="name of menu file.html" scrolling="no" marginheight="0" noresize="noresize" name="left" />
<frame src="name of file.html" marginheight="0" noresize="noresize" name="right" />
</frameset>
</html> |
I'm not sure if the above page should be saved with a php or html extension, as I haven't done any frames with php pages. Try it both ways and see which works best.
Then create a normal html file, as if frames didn't exist, for the menu (all you want in the body is the ul and li's). For your target on each link, make it 'right' as that is the frame you want it to open in.
| Code: |
| <a href="history.php" target="right">Home</a> |
For the above code, for the second frame, the frame src should be the file you would normally have as a home page (minus the menu) so your page will look like
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Home</title>
type="text/css" />
</head>
<frameset cols="20%,*">
<frame src="menu.html" scrolling="no" marginheight="0" noresize="noresize" name="left" />
<frame src="home.html" marginheight="0" noresize="noresize" name="right" />
</frameset>
</html>
|
Make sure to include a doctype declaration on each html page. |
|
Archie
Joined: 27 Sep 2007 Posts: 2
|
Posted: Thu Sep 27, 2007 7:52 am |
|
|
|
@sticks464
Thank you. It works!
I saved all files with html extension. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|