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

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

Replies are listed 'Best First'.
Re: Re: Re: Re: Multiple page listings - previous/next feature
by b310 (Scribe) on Feb 08, 2003 at 14:57 UTC
    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
        Hi Poj, Thank you!!!! Yes, my param is keywords not description. I feel really silly. Thank you for all your help. Now everything is working.