Jump to content

show PDF within IFRAME works in IE, not FireFox, it opens PDF in same window


jasonc

Recommended Posts

edited...

 

i have just disabled a PDF viewer in FF and this now make the link open the PDF in a standard PDF viewer, acrobat

 

 

 

 

I have used the following to display the PDFS in my pages

 

in Internet Explorer it shows as it should, within the iframe but in firefox it opens the pdf in the same window but not in the iframe it just loads the pdf in the whole window like i had just opened the pdf from the direct file.

 

why is this and how can i stop this

 

this is my code..

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--

/*


taken out this part too much css code here
*/


-->
</style>
</head>

<body>
<div align="center"><a href="http://site.com/"><font size="6">site</font></a></div>
<table width="1012" align="center" cellpadding="5" bgcolor="#CCCCCC">
  <tr> 
    <td width="180" align="center" valign="top">

<div id="leftcolumn">
<br /><br />
      <div class="module_menu">
  <h3>Main Menu</h3>
<ul class="menu">
  <li><a href="http://site.com/"><strong>Home</strong></a></li>
  <li><a href="?ac=pm"><strong>Previous minutes</strong></a></li>
  <li><a href="?ac=c"><strong>Contact us</strong></a></li>

</ul>
  </div>
  <br /><br /><br />
  <div class="module">
  <h3><font size="2">Recent updates</font></h3>
<font size="2">Agenda</font>
<ul class="latestnews">
<li><a href="?a=21092009"><strong>21 Sep 2009</strong></a></li>
</ul>
<br>

<font size="2">Minutes</font>
<ul class="latestnews">
<li><a href="?m=31121969"><strong>31 Dec 1969</strong></a></li>
</ul>
<br><br>
<h3><font size="2">Next meeting</font></h3>
<ul class="latestnews">
	<div align="center">
	<strong>21 Sep 2009</strong>
	</div>

</ul>	  </div>
<br /><br /><br />
</div>
    </td>
    <td width="800" valign="top"> 
      <p align="center"><strong><font color="#666666">Welcome to our website.</font></strong></p>
<p> </p>
<? include("action.php"); ?>
<p> </p>
<p> </p>
    </td>

  </tr>
</table>
</body>
</html>

 

 

this is my action script that show the relevant page needed....

 

action.php

<?
$articledate = stripstring($_GET['a']);
$countername = "Agenda " .$articledate;
$filename = "agendas/RRA - " . substr($articledate, 0, 2) . "-" . substr($articledate, 2, 2) . "-" . substr($articledate, 4, 4) . " - Agenda.pdf";
if (file_exists($_SERVER{'DOCUMENT_ROOT'} . "/" . $filename)) {
// include("agendas/RRA - " . substr($articledate, 0, 2) . "-" . substr($articledate, 2, 2) . "-" . substr($articledate, 4, 4) . " - Agenda.htm");
?><iframe src="<?=$filename;?>" height="800" width="100%" frameborder="0" scrolling="no"></iframe><?
} else {
$countername = "Agenda NOT VALID";
include("agendas/notvalid.php");
}
?>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.