Jump to content


Photo

page constantly reloading?


  • Please log in to reply
4 replies to this topic

#1 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 22 July 2006 - 09:21 AM

if i use an iframe on the specified line:
    <?php echo "<div id='dm_1' class='hdn'>"; include('post.php'); echo "</div>"; ?>

it works fine, as opposed to using include, the page keeps reloading!! its rather annoying

here is my entire script:
<?php
session_start();
$loggedin = $_SESSION['username'];

include('../dc-inc/connect.php');
include('../dc-inc/config.php');

if(!$loggedin)
{
include('dc-login.php');
die();
}
?>

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<style type='text/css'>.hdn {display:none;}
.show {}
</style>

<script type='text/javascript'>
function click() {
    document.getElementById("dm_1").className = "show";
}
</script>


<title><?php echo "$SITE_NAME - Powered by Dc News"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>

<center><div class="all">
	<div class="box">
	  <div class="menu"><a href="#">Home</a><a href="#">Links</a><a href="#">Contact</a></div>

		<div class="header">
		  <h1><span class="style1">Administrative</span> Panel </h1>
	  </div>
<div class="content"> 
		  <h1>Your control panel  </h1>
		  <p>Main controls to help you get started:	
		  <Br />	  
		  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  <a href='#' onclick='if(document.getElementById("dm_1").className == "hdn") {document.getElementById("dm_1").className = "show"} else {document.getElementById("dm_1").className = "hdn"};return false;'>• Make a news post</a>
    <?php echo "<div id='dm_1' class='hdn'>"; include('post.php'); echo "</div>"; ?>

		  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  • Edit your profile
		  <br />
		  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  • Change your sites settings
		  <Br />
	  </div>
<div class="footer">Dc News <a href="http://developmentchat.com/"></a>Copyright &copy; 2006</div>

	</div>
</div>
</center>
</body>
</html>


#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 22 July 2006 - 12:42 PM

it works fine, as opposed to using include, the page keeps reloading!! its rather annoying

What do you mean? when you put the whole iframe in the included file post.php it just makes the page reload??

Regards
Liam
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#3 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 22 July 2006 - 04:36 PM

if i put it in an iframe, it works fine. using include makes it reload.

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 22 July 2006 - 05:13 PM

Whats in post.php?

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 22 July 2006 - 05:16 PM

Make a function page and add the function to the page using one include statement.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users