frame

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Vietboy
Forum Commoner
Posts: 41
Joined: Mon Dec 01, 2003 10:59 pm

frame

Post 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?
?>
User avatar
aquila125
Forum Commoner
Posts: 96
Joined: Tue Dec 09, 2003 10:39 am
Location: Belgium

Post 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>
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post 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....
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

also, this belongs to Client Side, since it's not related to PHP
Post Reply