Call an HTML page


When we click on the Hyperlink of subject a new HTML Page should be pop up and shows the body of the mail.
I have written two perl codes first is for displaying the page with folders with subject another perl code having function to show the body.How can I integrate them so tht first code which is having hyperlink on subject directly goes to the HTML page which shows body of the mail i.e. another perl code which is having function to display this.



You could open the HTML file, read it into an array, then line for line print it back to the browser.

For example:

open (HTMLDOC, "<../path/to/your/file.htm");
flock (HTMLDOC, 1);
my @htmlFile = <HTMLDOC>;
close (HTMLDOC);

print "Content-type: text/html\n\n";
foreach (@htmlFile) {
print $_;
Question Answered as of 8 Years Ago by Dukane

alternatives that do the same thing:

print directly from file:

print "Content-type: text/html\n\n";
open (HTML, "<../path/to/your/file.htm");
print <HTML>;
close (HTML);

use a scalar instead of an array (slurp mode)

print "Content-type: text/html\n\n";
open (HTML, "<../path/to/your/file.htm");
my $html = do {local $/; <HTML>}; 
close (HTML);
print $html;

Can javascript be included in the above form of display?
I don't see my js functioning in my case.

This question has already been solved: Start a new discussion instead
Start New Discussion
Tags Related to this Article