PDA

View Full Version : refreshing php include page



mickyd
09-07-2006, 08:34 PM
Hey, I was refered here by a user of oscommerce to ask a question regarding an alternative to frames.

I have created a 2 new pages.

the first php page containes all the info like include header include footer... etc.. like a template page

the second page contains the contents. I want this page to refresh but the rest ie the header, footer, colum right of the first page not to refresh.

Now, as the content page is a page called by the first page an included page if you like, I was going to use frames but I got told to ask for another way to do this.

anyone have any ideas?

If posting the pages codes would be usefull.. let me know..

the user that refered me here suggested dhtml or css

blm126
09-07-2006, 09:30 PM
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

mickyd
09-07-2006, 11:12 PM
Perhaps I should explain a little more....

This is the first page this is the same as for all pages it is essentially a template for all the other pages
<?php
/*
$Id: new_page.php,v 1.18 2002/06/16 20:27:10 harley_vb Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_resources);

$location = ' &raquo; <a href="' . tep_href_link(FILENAME_resources, '', 'NONSSL') . '" class="headerNavigation">' . NAVBAR_TITLE . '</a>';
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->

<div align="center">

<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo TEXT_INFORMATION; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
</tr>
</table></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</div>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

This is the second php page this is the page that holds the content.


<?php

define('NAVBAR_TITLE', 'Links & Resources');
define('HEADING_TITLE', 'Links & Resources');

define('TEXT_INFORMATION', '
<head>
<meta http-equiv="refresh" content="10">
</head>
<body>
<BR>
PAGE CONTENT GOES HERE THIS PAGE WILL BE PARSED
<BR />
</body>

</html>


');
?>

I need the above page to refresh only without interfering with template page (the first page)

See attatched image.

The outer edges ie navigation.. header... footer are created by the first page code above...

the inner or middle is created by the second page code above.

I need help with placing this http://www.dynamicdrive.com/dynamici...jaxcontent.htm in my page that is to be parsed (second page code)

I want the inner or content parsed page only to refresh.. the area inside the red square.

mickyd
09-07-2006, 11:34 PM
SOLVED It...

http://www.dynamicdrive.com/dynamicindex17/iframessi.htm