what exactly does my Mojo code need to do to respond to the AJAX post properly?

use post with a suitable /path as examples in Mojolicious::Lite +and jQuery +AJAX + Mojo::Template and return the content

What is the strategy I need to implement to make the appropriate post response from my server?

Read the basic introductory tutorial on Mojo ... or view the slideshow/video ... and run the examples and play with them (or make them run) ... save each change to a different file ... review as necessary ... repeat as necessary ... and then you're done :)

Then you can use param like Mojolicious::Lite +and jQuery +AJAX + Mojo::Template and return some content

Old CGI Connector

Looks like its missing the following (needs read use CGI or die; Ovids CGI Course/Ovid's CGI Course )

use CGI(); my $q = CGI->new ; my $dir = $q->param('dir');

See also
Mojolicious::Lite +and jQuery +AJAX + Mojo::Template
Re: Perl CGI multiple buttons (http/ajax), Re: How do I mix up Perl and jQuery (for everyone), Post from jQuery to Perl - can't access parameters
How do I mix up Perl and jQuery (for beginners)
Mojolicious::Lite +and jQuery +AJAX + Mojo::Template
Using Perl, jQuery, and JSON for Web development
Basic debugging checklist
brian's Guide to Solving Any Perl Problem
CGI Help Guide
Troubleshooting Perl CGI scripts
learn about the internet, Web Programming: For Beginners, to get an overall picture of how the internet works, how tcp/ip, sockets, html, ajax, all fit together.
Re: How do I mix up Perl and jQuery (for everyone)
Simple example of CGI (Perl) + HTML + CSS + Javascript/jQuery + Ajax
use CGI or die;
Mojolicious::Lite +and jQuery +AJAX + Mojo::Template
Re: Perl CGI multiple buttons (http/ajax), Re: How do I mix up Perl and jQuery (for everyone), Post from jQuery to Perl - can't access parameters


In reply to Re: Mojolicious/Ajax Server-Side File Tree by Anonymous Monk
in thread Mojolicious/Ajax Server-Side File Tree by Endless

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.