----- Original Message ----- From: "RA Jones" <[EMAIL PROTECTED]> To: "List - CGI-Application" <[email protected]> Sent: Saturday, October 21, 2006 5:23 PM Subject: Re: [cgiapp] CGI::App & CGI:Ajax nearly working - please help with last bit
> Jonathan Mangin wrote: > > > The examples I followed have this in the template: > > > > [% page_js = BLOCK %] > > [% ajax_js %] > > [% END %] > > > > <html> > > <head> > > [% page_js %] > > > > I haven't seen you mention it, so I thought I'd ask? > > I only had the [% ajax_js %] part in the template. Putting the other two > around it stops the j/s appearing, and so no AJAX function. Thanks anyway. > -- > Richard Jones > Leeds, UK > mailto:[EMAIL PROTECTED] > Well, just to finish the story... I needed to register the subs this way. They also need to be defined as run_modes in setup. my $activity_url = 'fitness.pl?rm=getActivity'; my $daily_url = 'fitness.pl?rm=dispDaily'; my $pjx = new CGI::Ajax('getActivity' => $activity_url, 'dispDaily' => $daily_url); my $ajax_js = $pjx->show_javascript(); my $params = {ajax_js => $ajax_js, --Jon --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
