Page 1 of 1

frame

Posted: Tue Dec 16, 2003 10:44 pm
by Vietboy
When I use HTML in PHP file:

Code: Select all

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<frameset rows="80,*" cols="*" frameborder="NO" border="0" framespacing="0">
  <frame src="top.php" name="top" scrolling="NO" noresize>
  <frameset cols="80,*" frameborder="NO" border="0" framespacing="0">
    <frame src="left.php" name="left" scrolling="NO" noresize>
    <frame src="main.php" name="main">
  </frameset>
</frameset>
<noframes><body>
</body></noframes>
</html>
When I put a link in left.php file, such as <a href="file.php">A</a> it should target to "main" but it doesn't.

Then I set
the codes to

Code: Select all

<frame src="left.php" name="left" target="main" scrolling="NO" noresize>
    <frame src="main.php" name="main" target="_self">
When I try it out again.. it doesn't work.

I even try to put the code <a href="file.php" target="main" inside the left.php.. still no work..
Any one know why?
?>

Posted: Wed Dec 17, 2003 3:32 am
by aquila125
check out the basics of framesets...


in left.php you want something to change the main screen?

<a href='something.php' target='main'>link</a>

Posted: Wed Dec 17, 2003 6:16 am
by dull1554
yea you cant just assume that the browser knows where to target the link, thats why you have to include

Code: Select all

target=""
in your anchor tag......i myself am a big fan of <iframes>.........but some browsers don't like them, but frames are more or less the same.........good luck....

Posted: Wed Dec 17, 2003 7:19 am
by vigge89
also, this belongs to Client Side, since it's not related to PHP