I need to figure out how to create a shortcut into a dynamically generated help file for 3 different products.
I figure this is kind of what I need to accomplish this.
1) Setup 3 hashes to store the topics and the values for each product.
2) Readin and store the topic value from the query string
3) compare the query string topic value with the keys in each hash to find the correct topic, then pull the corresponding value for that topic out of the hash.
4)finally display the correct topic to the end user by substituting my result above with variable startpoint which sets what help topic to start with and here is my problem how do I pass the value of target(my help topic I want to pass into the sub tHelp?)
my attempt to create a hash, seems like it should have worked but if I just try to write out the values the hash should contain I get nothing at all in my browser window..odd.
2) If I set variable $topic = to the topic value in the query string this should set me up to do my comparison with the keys in the hash not sure how to accomplish the comparison.. could use an example on how to do something like this.
<%
use Win32::OLE;
#use strict;
#use warnings;
my $User = $Request->item("Login")->item();
my $Site = $Request->item("Site")->item();
#my $topic= $Request->item("Topic")->item();
my $Referer = $Request->ServerVariables("HTTP_REFERER")->item();
my $topic = $Request->ServerVariables->{'QUERY_STRING'}->item("Top
+ic");
my %topics = (
home => 'TEMPO%205%20Help%20Topics-01-1.html',
listingmgr => 'TEMPO%205%20Help%20Topics-06-1.html',
cma => 'TEMPO%205%20Help%20Topics-11-1.html',
hotsheetmgr => 'TEMPO%205%20Help%20Topics-10-1.html',
clientmgr => 'TEMPO%205%20Help%20Topics-05-1.html',
tempofinancials => 'TEMPO%205%20Help%20Topics-14-1.html',
tools => 'TEMPO%205%20Help%20Topics-18-1.html',
rep => 'TEMPO%205%20Help%20Topics-12-01.html',
taxmgr => 'TEMPO%205%20Help%20Topics-13-1.html',
TempoMemberInfo => 'TEMPO%205%20Help%20Topics-19-1.html',
email => 'TEMPO%205%20Help%20Topics-09-1.html',
);
if (!defined($topic)) {
}
my $startpoint = $topics{$topic};
if (!defined($startpoint)) {
exit();
}
return $startpoint;
help subroutine.
sub tHelp(\$topics)
if ($Session->{'usrType'} eq 'Std')
{
if ($Request->ServerVariables("SERVER_NAME")->item()=~/tempohelp/i
+)
{
my $startpoint=$topics($topic);'Content/HELP/TPO/default/Tempo_
+help-08-1.html';
my $target='Tempo%20help_frame';
$str .= shadowBox("Tempo Help", qq^<help_iframe name="$target"
+startpoint="$startpoint"/>^ , ($g_docWidth/5*4-(2*$g_docSpace)));
return $str;
}
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.