Forum Moderators: coopster

Message Too Old, No Replies

php file opens in new window via hyperlink, why?

Question regarding creation of dynamic html page opening new window.

         

mjd22

5:40 am on May 31, 2004 (gmt 0)

10+ Year Member



Hello, I would appreciate some help to the following problem:

I am developing a site in frontpage 2002. I am using shared borders with hyperlinks on the left border. Each hyperlink has a parameter set in the hyperlink dialog box. A sample:

<a href="../../phpdetails.php?id=slides">

These are in the left.htm file that frontpage writes in its hidden _borders directory.

My phpdetails.php file generates content dynamically with the passed parameter. It has the identical header as other pages. During the php section the program uses the parameter passed from left.htm, retrieves data from a mysql table, formats it and displays it. However, it displays the data in a new window without the shared borders.

This is not what I expected as I thought the server would see what looks like a link to just another page. I do not want a new window and I do want the borders. What am I missing!

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>company name</title>
<meta name="Microsoft Theme" content="black-funtime 011, default">
<meta name="Microsoft Border" content="tlb, default">
</head>

<body>

<?php
$id2=$id;

read data
create table
display data
end

Philosopher

3:53 pm on May 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmm..I'm not sure how Frontpage handles those as I stay away from using it's navigation system.

You don't by any chance have a target attribute accidentally set in your hyperlinks do you? Possibly a target="_blank"?

mjd22

5:57 pm on May 31, 2004 (gmt 0)

10+ Year Member



No targets set. I am getting an error message when I check the properties of the index page that says something like
"Cannot run the FrontPage Server Extensions on this page: "phpdetails.php"

I don't know why not?

I seriously am thinking of disabling the frontpage extensions off my server as it tends to be such a pain. Any idea what would be the ramifications?

httpwebwitch

6:17 pm on May 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Weaning your site from Frontpage may be the most liberating thing you will ever do as a webmaster. :-)

I don't want to be too critical of FP; it is a decent tool for beginners making a simple static website, as long as they're willing to empty their pockets into Microsoft's overflowing coffers.

Last year I inherited an enormous FP site that I switched over to PHP. The end result was a better development environment for dynamic content, and "borders" that weren't just static HTML.

Instead of using FP borders, create a nice template and chop it into "header.php" and "footer.php", and use PHP to include() them at the top and bottom of every page.

If you have the ability to create a subdomain in which to test your site without FP, do that; get your new PHP site all ready to go, then switch it to the live domain when it's ready.

Then chuck those FrontPage extensions! Get rid of 'em! You won't regret it!

Philosopher

6:26 pm on May 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Amen to that. All in all, I think FP can be a good tool to get the template of a site down. The general look and feel things. But for heavy things, forget it. Do as was suggested in the previous post and you will be MUCH happier.

I just finished removing the frontpage nav components from a site a client purchased. WHAT a pain, but I'm a much happier person now.

mjd22

9:30 pm on May 31, 2004 (gmt 0)

10+ Year Member



Thanks for everyone's comments. I knew better -- I should have forced myself off fp two years ago when I had another issue that was never resolved as fp handled the function in their undocumented black boxes. But the path of least resistance beckoned me....Jean