Click to See Complete Forum and Search --> : Best method to create a complex pop-up window?


jrlamar
05-12-2003, 12:40 PM
OK, here's the situation ...

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

<input type=HIDDEN name="pagetosend" value="/root/path/to/example.html">
<input type=HIDDEN name="pagename" value="Example Page Title">
<input type=HIDDEN name="pageurl" value="http://www.123.com/example.html">

What's the best way (or ANY way) to accomplish this? Help!



Thanks,

Jason

pyro
05-13-2003, 08:07 AM
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...

jrlamar
05-15-2003, 02:42 PM
pyro,

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.

Jason

pyro
05-15-2003, 02:44 PM
lol... rather than move this to the PHP section, just go post there, and I'll get around to answering it for ya... ;)

jrlamar
05-15-2003, 02:46 PM
OK ... I feel like I'm playing musical threads at this point. Heh, heh.

Jason