1.11M Members

Call an HTML page

 
0
 

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.

Thanks

 
0
 

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 7 Years Ago by Dukane
 
0
 

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;
 
0
 

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

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