Posted by Frank Hale on 1999-02-27
I am writing a little perl script. It generates an HTML page with a link
on it. When the link is clicked I want it to call a subroutine in my
perl script. How can I get it to do that?
Here is my code:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
&generateTestPage;
sub generateTestPage {
print "<HTML>\n";
print "<TITLE>Test\n";
print "</TITLE>\n";
print "<BODY>\n";
# How can I call the newpage function when the link is clicked???
print "<a href=\"\">click me</a>\n";
print "</BODY>\n";
print "</HTML>\n";
}
sub newpage {
print "<HTML>\n";
print "<TITLE>New Page\n";
print "</TITLE>\n";
print "<BODY>\n";
print "This is another test page";
print "</BODY>\n";
print "</HTML>\n";
}
Thank you.
--
From: Frank Hale
Email: frankhale@xxxxxxxx.xxx.xxx
ICQ: 7205161
Website: http://209.78.30.124/ -
until franksstuff.com gets transferred over to my new host.
"Knowledge only takes you so far, Determination takes you the rest of
the way"
Previous post | Next post | Timeline | Home