# Perl CGI script: use myPackage; ### CGI Object ### my $cgi = new CGI; ### Ajax Object ### my $pjx = new CGI::Ajax( 'exported_func1' => \&exported_func1_code, 'exported_func2' => \&exported_func2_code, ); print $pjx->build_html($cgi, \&Show_HTML); sub exported_func1_code{ my $commentsobj = new myPackage(); ## some code that works.. (not package problem) ## this returns the data to "showContextMenu" ## and I can actually see the pop up.. $someHTML = "
"; return $someHTML; } sub exported_func2_code{ ## this one is called from inside the popupMenu ## but seems it cant be called from there..any suggestion? my ($p1,$p2,$p3,$p4) = split("\_",shift); my $commentsobj = new myPackage(); my $result = $commentsobj->myFunction($p1,$p2,$p3,$p4); return 1; } sub Show_HTML{ my $html_all = "