One of my company's pages has a link to allow uses to download a set of data in csv (Comma Separated Value) format. The corresponding implementation is like this (the source code with an extension name as 'csv', instead of a conventional 'pl'):
The above code works fine. Now, according to a new spec, the code needs to check a flag first:
In a test run, when $flag = 0, I did get a page shown '$msg' with 'here' underlined, indicating it is a hype link.However, the link is NOT clickable! I am using IE 6 and I noticed that on the lower left conor of my IE, it reads: “Quick View Plus – XML with DcoType HTML”. I also noticed that when $falg == 1, then the lower left conor message reads: “Quick View Plus – 7-Bit Text File”.
My question is when $flag = 0, how do I make a page in a conventional html format so that the link is clickable? I tried to find some info through google, but went nowhere.
Thank you very much for your help.
Code:
my $csv = Text::CSV_XS->new({
'quote_char' => '"',
'escape_char' => '"',
'sep_char' => ',',
'binary' => 1
});
$csv->combine(@headers);
print $csv->string(),"\r\n";
$csv->combine(@columns);
print $csv->string(),"\r\n";
The above code works fine. Now, according to a new spec, the code needs to check a flag first:
Code:
if($flag == 1) {
$csv->combine(@headers);
print $csv->string(),"\r\n";
$csv->combine(@columns);
print $csv->string(),"\r\n";
}
else {
my $msg = "Some instructions. Click ". a({-href=>'/anotherPerlCode.pl'}, 'here');
print start_html();
print "$msg<p>\n";
print “@columns”;
print “end_html();
}
In a test run, when $flag = 0, I did get a page shown '$msg' with 'here' underlined, indicating it is a hype link.However, the link is NOT clickable! I am using IE 6 and I noticed that on the lower left conor of my IE, it reads: “Quick View Plus – XML with DcoType HTML”. I also noticed that when $falg == 1, then the lower left conor message reads: “Quick View Plus – 7-Bit Text File”.
My question is when $flag = 0, how do I make a page in a conventional html format so that the link is clickable? I tried to find some info through google, but went nowhere.
Thank you very much for your help.