in reply to Re: Multiple page listings - previous/next feature
in thread Multiple page listings - previous/next feature

Hi, I made the modification based on your suggestion. I'm receiving a 500 Internal Server Error. Any thoughts? Thanks
  • Comment on Re: Re: Multiple page listings - previous/next feature

Replies are listed 'Best First'.
Re: Re: Re: Multiple page listings - previous/next feature
by linebacker (Scribe) on Feb 07, 2003 at 20:16 UTC
    Did you try to run the program from the command line to see if you can figure out where your error(s) are? Make sure you use carp (if you already are not doing so), as in:
    use CGI::Carp qw(fatalsToBrowser);
    This should at least help you troubleshoot without being blind to the trouble. Keep at it, you are almost there.
      Hi, Yes, I'm already using the Carp statement. Unfortunately, I'm not receiving a clearer error message. I'm not quite sure how to run it from the command line. I'm new at this stuff. Can you tell me how? Thanks
Re: Re: Re: Multiple page listings - previous/next feature
by poj (Abbot) on Feb 08, 2003 at 10:06 UTC
    It must be the print statement that is now being executed. I can't explain the error but if you want the links at the bottom of the page you can't print them inside the sub. I suggest you add them onto the page returned like this ;
    @nav_link = map { "[$_]\n" } @nav_link; $page .= "<hr>@nav_link"; return ($page);
    poj
      Hi Poj, Thanks for the help. I used your suggestion and now the links do appear on the page. I seemed to have another problem. When I click the link for page 2, it brings me back to my search page instead of showing me the next two items. I think this might be caused in the subroutine gen_nav_link. At the same time, the code in this subroutine looks ok to me. Any thoughts on why when I click the Next page or Page 1 links, it brings me back to the search page? Thanks for your help.
        Looking at the code on you scratchpad, doesn't the search routine use a parameter called 'keywords' rather than 'description' ? Here ;
        my $val = WebDB::trim (param ("keywords"));
        poj