From a static HTML page, I'm calling a Perl script in a pop-up window (via JavaScript) that I've customized to provide an "e-mailable version" of the HTML content. The trick is that the pop-up window has to have information that varies from page to page (specifically, the URL, the title, and the root server path to the page). Previously, I've hand-coded each page individually ... which is a major pain in the neck, of course.
So my question is: How can I create a pop-up window that automatically pulls in the necessary information from the parent window -- that is, the information inside the <title> tags as well as the document name (example.html) -- which I can then drop into 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 ...
I'm going to move this to the CGI forums. You will be more likely to get an answer there. It could easily be done in PHP, but since you are doing this in Perl, we'll see if someone knows a way to do it in that or SSI...
How could this be done in PHP? I could make the pop-up window a PHP document ... but would this functionality require the referring (parent) window also be in PHP? Because my main site is just straight HTML at this point.
Bookmarks