Jump to content

PHP link opening in wrong way....


zeropoint

Recommended Posts

hey there first i am total noob never before today seen PHP code so this might be funy and easy for you profesionals but its impossible for me...

the page opening in new window but i want it to open on the right side of the page in <div class="rightcont"> dont know what to do ;-(( please if someone can help thank you in advance

well see for your self

 

 

 

<html>

 

<head>

<meta http-equiv="content-type" content="text/html;charset=utf-8" />

<link rel="StyleSheet" type="text/css" href="all.css"/>

<title>our family</title>

<style type="text/css" media="screen"><!--

.main { width: 100%; height:100px}

.leftcont { width:100px; float:left; height:100px}

.rightcont { margin-left:100px; width:auto; height:100px}

--></style>

</head>

 

<body><img src="top.jpg">

<div class="main">

 

<!--agl:cssobject id="AA77B5" type="Left Fixed Box" /-->

<div class="leftcont">

<h1>test</h1>

<a href="?content=test" target="right">test</a>

<h1>mum</h1>

<br>

<br>

<h1>dad</h1>

<br>

<br>

<h1>bro</h1>

<br>

<br>

<h1>links</h1>

<br>

<br>

<h1>Docs</h1>

</div>

<div class="rightcont">

<?

if(isset($_GET['content']))

{

include_once($_GET['content'].'.html');

}

else

{

echo "no content for this page";

}

?>

</div>

</div>

</body>

 

</html>

Link to comment
https://forums.phpfreaks.com/topic/48928-php-link-opening-in-wrong-way/
Share on other sites

<div> tags do not work the same as framesets.  your link says: target="right" which tells teh browser to load the page in the window/frame called "right"...and if you have not set up a frameset with a frame by that name, it will just open in a new window (that henceforth is called "right").  Your question really seems more related to CSS than PHP, so you may ask around in the CSS section of this forum.  You have at least two options depending on what you are really doing:

1.  have several <div> areas and hide some of them and display one...then as needed hide/unhide the certain sections that apply to whatever you need.

2.  Using JavaScript you can write new content into a <div>...so you can change the content that way.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.