From a static HTML page, I'm calling a Perl script from a pop-up window (via JavaScript) that I've customized to provide an "e-mailable version" of the static HTML content from the parent window. The trick is that the pop-up window -- which contains a simple form -- has to have information that varies from page to page (specifically, the URL, the title, and the root server path to the parent HTML page). Previously, I've hand-coded each pop-up window individually ... which is a major pain in the neck, of course.
So my question is: How can I create a generic pop-up window that automatically and dynamically pulls in the necessary information from the parent HTML window -- that is, the information inside the <title> tags as well as the document name (example.html) -- which I can then drop into the form tags in this pop-up window? In other words, I want to pass parent window variables into the pop-up window HTML code like this ...
Still getting the error, even after the $rootpath fix. It looks to be the $host line that's causing the problem (assuming the line numbering is accurate). Anyway, here's the PHP info page link you requested ...
All the variables you are using are fine, according to the phpinfo() script you linked to. Did you just copy it out of these forums? If so, that might be the problem. Try typing it in, rather than copying and pasting...
Yes! That did it! Although the PHP is executing properly now, I have new problems: All the hidden variables are referencing the pop-up window itself ... rather than the parent window. Thus ...
Oh... that makes it entirely different ballgame. You are not going to have to submit the values to your popup using a query string (yourpopup.php?firstval&secondval&thirdval) and then parse this off on the popup page using the $_SERVER['QUERY_STRING'] command...
Please don't tell me that I have to set those values (from the parent window) manually. If so, I'm right back to where I started from. The whole point of this, as I explained at the beginning of the thread, was that I wanted to have an "automated" pop-up window that pulled in attributes from whatever parent window opened it.
Nope, you don't have to set them manually, as I said, you will just send the values from your parent window to the popup window via the query string. You do that like this:
Bookmarks