Yeah i've been thinking ofchanging the whole site to one static htmlfile which is the external frame and I create the internal frame.

Anyway I've thought about the fact that it could be a problem witht the content type but it might be, because I chose to download the file it offers and It was a file ful of the HTML that was meant to be sent to the browser.

I managed to route out and older version of the script before I did alot of the editing. This script works and I've compared it to the new one but I can't find any diffenrence that could cause a change.

#!/usr/bin/perl -w use strict; use warnings; use diagnostics; use CGI; my $q = new CGI; my $status = $q->param('status'); my $album = $q->param('album') ; my $img = $q->param('pic') ; my $user = $q->param('user') ; my @html; my $row; my $src; my $pic; my $html; my $viewersrc = "http://eoinmurphy00.netfirms.com/albums/$album/$img"; if ($status eq "viewall"){ $html = viewall(); } elsif ($status eq "viewer"){ $html = viewer($viewersrc, $user); } print qq(Content-type: text/html\n $html); sub viewall{ my $pic; open LOG, ">logfile" or die $!; my $dir = "../www/albums/$album"; opendir DIR, "$dir" or die $!; my @images= grep /\.img/, readdir DIR; closedir DIR; print LOG "\@images contains ============== @images\n\n"; my $counter = "0"; foreach $pic (@images){ $src = "http://eoinmurphy00.netfirms.com/albums/$album/$pic"; print LOG "My img src is $src for pic $pic\n"; if ($counter == 3){ $counter = "0"; $row = qq(</tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>\&nbsp;</td> <td><a href="http://eoinmurphy00.netfirms.com/cgi-bin/albu +ms.cgi?status=viewer&album=$album&pic=$pic&user=$user"><img src="$src +" width="175" height="129"></a></td> <td>\&nbsp;</td> <td>\&nbsp;</td>); push @html, $row; $counter++; } else{ $row = qq(<td>\&nbsp;</td> <td><a href="http://eoinmurphy00.netfirms.com/cgi-bin/albu +ms.cgi?status=viewer&album=$album&pic=$pic"><img src="$src" width="17 +5" height="129"></a></td> <td>\&nbsp;</td> <td>\&nbsp;</td>); push @html, $row; $counter++; } print LOG @html; } my $album_html = qq( <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Microsoft FrontPage Express 2.0"> <title>Apres Bonne Anse Plage</title> </head> <body bgcolor="#000098" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"> <p align="center">&nbsp;</p> <div align="center"><center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="5"><img src="http://eoinmurphy00.netfirms.com/ima +ges/title.jpg" width="780" height="224"><br> </td> </tr> <tr> <td colspan="5"><div align="center"><center><table border="1" cellpadding="0" cellspacing="0" width="780"> <tr> <td align="center" bordercolor="#FFFFFF"><p align="center"><font color="#FFFFFF" size="6" face="ITC Zapf Chancery"><strong><u>$album</u></strong +></font></p> <hr> <div align="center"><center><table border="0" cellpadding="0" cellspacing="0"> <tr> @html </table> </center></div><p align="center"><font color="#FFFFFF" face="Abbess"><em></em></font>&nbsp;</ +p> <div align="center"><center><table border="1" cellpadding="0" cellspacing="0" width="775"> <tr> <td align="center" valign="bottom" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#FFFFFF"><p align="center"><a href="http://eoinmurphy00.netfirms.com/cgi-bin +/main.cgi?status=home&user=$user"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><strong><u>Home</u></ +strong></font></a></p> </td> <td align="center" valign="bottom" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#FFFFFF"><p align="center"><a href="http://eoinmurphy00.netfirms.com/cgi-bin +/main.cgi?status=albums&user=$user"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><strong><u>Albums</u> +</strong></font></a></p> </td> <td align="center" valign="bottom" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#FFFFFF"><p align="center"><a href="http://eoinmurphy00.netfirms.com/cgi-bin +/main.cgi?status=upload&user=$user"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><strong><u>Upload</u> +</strong></font></a></p> </td> <td align="center" valign="bottom" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#FFFFFF"><p align="center"><a href="http://eoinmurphy00.netfirms.com/cgi-bin +/main.cgi?status=contact&user=$user"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><strong><u>Contact </u></strong></font></a></p> </td> </tr> </table> </center></div></td> </tr> </table> </center></div><p><font color="#FFFFFF" face="Abbess"><img src="http://eoinmurphy00.netfirms.com/images/border.jpg" width +="780" height="51"></font></p> </td> </tr> </table> </center></div> </body> </html>); return $album_html } sub viewer{ my( $src, $username ) = @_; my $next_html; my $previous_html; my $viewer_html = qq( <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Microsoft FrontPage Express 2.0"> <title>Apres Bonne Anse Plage</title> </head> <body bgcolor="#000098" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"> <p align="center">&nbsp;</p> <div align="center"><center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="5"><img src="http://eoinmurphy00.netfirms.com/ima +ges/title.jpg" width="780" height="224"><br> </td> </tr> <tr> <td colspan="5"><div align="center"><center><table border="1" cellpadding="0" cellspacing="0" width="780"> <tr> <td align="center" bordercolor="#FFFFFF"><div align="center"><center><table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td colspan="2"><p align="center"><font color="#FFFFFF" size="7" face="ITC Zapf Chancery"><strong><u>$album</u> +</strong></font></p> </td> </tr> <tr> <td width="300"><p align="center"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><u>Previous</u></font +></p> </td> <td width="300"><p align="center"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><u>Next</u></font></p +> </td> </tr> </table> </center></div><hr> <p><img src="$src"></p><p>&nbsp;</p> <div align="center"><center><table border="1" cellpadding="0" cellspacing="0" width="775"> <tr> <td align="center" valign="bottom" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#FFFFFF"><p align="center"><a href="http://eoinmurphy00.netfirms.com/cgi-bin +/main.cgi?status=home&user=$username"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><strong><u>Home</u></ +strong></font></a></p> </td> <td align="center" valign="bottom" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#FFFFFF"><p align="center"><a href="http://eoinmurphy00.netfirms.com/cgi-bin +/main.cgi?status=albums&user=$username"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><strong><u>Albums</u> +</strong></font></a></p> </td> <td align="center" valign="bottom" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#FFFFFF"><p align="center"><a href="http://eoinmurphy00.netfirms.com/cgi-bin +/main.cgi?status=upload&user=$username"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><strong><u>Upload</u> +</strong></font></a></p> </td> <td align="center" valign="bottom" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" bordercolorlight="#FFFFFF"><p align="center"><a href="http://eoinmurphy00.netfirms.com/cgi-bin +/main.cgi?status=contact&user=$username"><font color="#FFFFFF" size="5" face="ITC Zapf Chancery"><strong><u>Contact </u></strong></font></a></p> </td> </tr> </table> </center></div></td> </tr> </table> </center></div><p><font color="#FFFFFF" face="Abbess"><img src="http://eoinmurphy00.netfirms.com/images/border.jpg" width +="780" height="51"></font></p> </td> </tr> </table> </center></div> </body> </html> ); return $viewer_html }
If you can see something wrong with this I'd love if you could point it out.

Thanks for the help so far

All the Best, Eoin...

If everything seems to be going well, you obviously don't know what the hell is going on.


In reply to Re: Re: link errors by eoin
in thread link errors by eoin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.