I have been working on templates that have polls and surveys as content. On my domain there is a folder called poll and contains the file index.php. This is the contents of index.php
Code:
<?php
$debug = false ;
//$debug = true ;

if($debug)
{
ini_set('display_errors', 1);
error_reporting(E_ALL);
}
?>
<?php 
$GLOBALS['HTTP_SERVER_VARS']; //set global server variables
extract($GLOBALS['HTTP_SERVER_VARS']); //extracts server variables

include( $DOCUMENT_ROOT.'/inc/myfunctions.php');//includes custom functions
?>
<?php get_poll(2,1); includes poll template and data set?>
The function get_poll() is included by included myfunctions.php. This is the code for get_poll().
Code:
<?php
function get_poll($poll_template, $poll_data)
	{
		global $dpath;//gets document root defined in myfunctions.php
		
		//sets witch poll template to use
		$poll = $dpath. 'templates/poll/polltemplate'. $poll_template. '/poll.php';

		//sets poll  data
		$polldata = $dpath. 'templates/poll/polltemplate'. $poll_template. '/polldata/pd'. $poll_data. '.php';

		include($polldata);//gets data to populate poll template
		include($poll);//gets poll template

	}
?>
The two parameters $poll_template, $poll_data indicate are integers and indicate what template file to include and what poll data set to include respectively.

In this case get_poll(2,1) would indicate include polltemplate2/poll.php into the /poll/index.php file. The polltemplate2/poll.php contains an- iframe.

It is this iframe that is acting schizoid. For testing proposes, all other code sans the iframe has been removed form the page. Also the iframe was changed to include Google.com.

Thus is the contents of templates/poll/polltemplate2/poll.php file:
Code:
<iframe src="http://google.com" name="ref" align="middle" frameborder="0" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0"></iframe>
When I visit "http://mydomain.com/poll" I expected to see google's home page inside a iframe. But instead my 404 error document activates then redirects to my domain's home page like the 404 error document is suppose to instead of showing google's home page.

What is really odd is this only happens in Firefox 2.002and not IE 6.0. IE shows google's homepage in the iframe like it is supposed to do. Also, in Firefox if I directly view "http://mydomain.com/templates/poll/polltemplate2/poll.php" it behaves as expected and the iframe show google's home page.

It seems that using php to include another php page the contains a iframe some how makes it impossible for the iframe to display the iframes content in Firefox.

What mistake am I making with iframe?