in reply to Per CGI::Ajax, different ajax functions on same page

but this produces HTML content twice.

Say what?

exported_func is supposed to be the name of the javascript function, how many do you have named exported_func?

  • Comment on Re: Per CGI::Ajax, different ajax functions on same page

Replies are listed 'Best First'.
Re^2: Per CGI::Ajax, different ajax functions on same page
by msinfo (Sexton) on Jun 03, 2013 at 17:06 UTC

    Thanks for looking into my code. But I didn't get you properly. So rephrasing my question below.

    my $pjx = new CGI::Ajax( 'exported_func' => \&perl_func ); print $pjx->build_html( $cgi, \&Show_HTML); # First ajax call my $sec_pjx = new CGI::Ajax( 'exported_func' => \&sec_perl_func ); print $sec_pjx->build_html( $cgi, \&Show_HTML); # Second ajax call

    Both this ajax calls produce different output on page. How do I combine them in single perl code file.

        Hi, Thanks your information was useful. Code is working perfect now.
        my $cgi = new CGI; # cgi # ajax function my $pjx = new CGI::Ajax( 'exported_func' => \&perl_func, 'exported_fun +c_two' => \&perl_func_two); print $pjx->build_html( $cgi, \&Show_HTML);
        Note: I am new to perlmonks, how do I mark this question as answer, or solved one.