http://qs321.pair.com?node_id=1050979


in reply to Re^2: Simple example of CGI (Perl) + HTML + CSS + Javascript/jQuery + Ajax
in thread Simple example of CGI (Perl) + HTML + CSS + Javascript/jQuery + Ajax

I appreciate the point of your example, and it does do what you intended. However I believe its complexity could be daunting for a newcomer to perl, jquery or ajax in general. In my experience people who ask the question of how do I use X with Y want to see the most basic example of the core workings that they can apply to their own problem. They do not want to have to take a working example of hundreds of lines and have to strip out what is irrelevant to them.

My example was not intended to do anything useful, interesting or impressive. It is purely a concise example of a jquery perl work flow. It was designed to be simple with only two files involved the one with the jquery and the one with the perl. That way the work flow can be easily tracked. As a demonstration to someone with limited prior knowledge of how jquery and perl can be used together, I do not believe that it needs to do any more.

Template Toolkit was used as it keeps the html out of the perl and allows for the html output to be understood without executing any perl. JSON was used because I have found that this is by far the simplest way for perl to pass data back to jquery.

  • Comment on Re^3: Simple example of CGI (Perl) + HTML + CSS + Javascript/jQuery + Ajax

Replies are listed 'Best First'.
Re^4: Simple example of CGI (Perl) + HTML + CSS + Javascript/jQuery + Ajax
by Anonymous Monk on Jan 15, 2014 at 17:04 UTC
    I agree with you man, I really appreciate you dumbed down version. Even if it does just calculate something Javascript could do, it's a less daunting place for me to start. Many thanks!