in reply to Printing html search results to the same page <div>

If I interpret "same page" to mean "page that looks like this one" rather than "current page without even reloading", the the answer is pretty simple; in fact the documentation for the CGI module shows pretty much this approach.

#!/usr/bin/perl -wT use strict; use CGI qw/:standard/; $|++; print header, start_html; ### ### Generate your page - everything up to the <div> you want - here ### if (my $search = param('search')){ ### ### Retrieve the results based on the search term ### print div("search_results go here"); } ### ### The content you want after the search <div> goes here ### print end_html;

Otherwise, ikegami and the others are right - it's a JS question.


-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells

Replies are listed 'Best First'.
Re^2: Printing html search results to the same page <div>
by ianshortreed (Initiate) on Apr 14, 2008 at 01:33 UTC
    This is exactly what I was looking for. I wanted to stay in Perl to make things uniform which is why I posted here! Cheers!