is there a soltion for this ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
gijs
Forum Commoner
Posts: 53
Joined: Wed Aug 28, 2002 4:05 am
Location: Belgium

is there a soltion for this ?

Post by gijs »

Hi,

1) a link overview.php activates display.php
2) display.php returns a pdf-file stored in a blob.

This works fine, but I instead I would like to do the following in display.php:

include("display_blob.php"); ==>displays the pdf
include("footer.php"); ==> here i would present a link to go back to overview.php

Problem is that Acrobat Reader takes up the whole page and footer.php is not displayed.

How could I handle this ?

Thanks for any help in advance,

Gijs
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

simple...use iframes :lol:
User avatar
gijs
Forum Commoner
Posts: 53
Joined: Wed Aug 28, 2002 4:05 am
Location: Belgium

That simple ?

Post by gijs »

Hi qads,

Is this realy this simple ?

Full explanation:

I start with a framed site: catalog.php which contains
1) navagition.php (leftframe)
2) intro.php (rightframe)

From navigation.php I use a link to pass variables to the rightframe and call overview.php which contains a list of articles.

How would I pass the variables from overview.php to the framed display.php which has for example:
a)display_blob.php (topframe)
b)footer.php (bottomframe)

Any suggestions ?

Thanks in advance,

Gijs
User avatar
gijs
Forum Commoner
Posts: 53
Joined: Wed Aug 28, 2002 4:05 am
Location: Belgium

Found it

Post by gijs »

Hi,

I went through the sticky concerning frames,javascript and found an interesting post from Virgill.
viewtopic.php?t=1030

He uses <?=$_SERVER['QUERY_STRING']?> combined with the "get" method in forms to pass variables even to pages within a framed-file.

I tried to make it work without "get" & "forms" and it works. Here is the code I used in dsiplay.php:

Code: Select all

<?php
// Check if the variable region_id is set
if (isset($_GET&#1111;'article_id'])) &#123;
?>
<html>
<head>
</head>
<frameset rows="50,*,50" border="0">
<frame name="top" src="header.php" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
<frame name="center" src="display_blob.php?<?=$_SERVER&#1111;'QUERY_STRING']?>" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
<frame name="bottom" src="footer.php" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
</frameset>
<body>
</body>
</html>
<?php
 &#125;
?>

Thanks,

Gijs
User avatar
gijs
Forum Commoner
Posts: 53
Joined: Wed Aug 28, 2002 4:05 am
Location: Belgium

Last Waltz

Post by gijs »

Final remarques,

Code: Select all

src="display_blob.php?article_id=<? echo $_GET&#1111;"article_id"]; ?>"
The code above works as well.

The previous one is perhaps more interesting if you want to pass all the variables from a query.

Gijs
Post Reply