Hello I am starting to learn more about perl in Dancer. I have a trivial question about javascript. Not sure what I am doing wrong so this is the code. It's not alerting. In views/index.tt :
<script type="text/javascript"> $(document).ready(function(){ $.get("/", function() { alert ('ALERTING'); }); }); </script> <div id='about-content'>Test Div</div>
In test.pl:
use Dancer; use strict; use warnings; use Dancer ':syntax'; use Dancer::Plugin::Ajax; our $VERSION = "1.0"; set serializer => 'JSON'; set template => 'template_toolkit'; get '/'=>sub{ template 'index'; }; dance;
Thanks!
In reply to using javascript for dancer perl app by perl_help26
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |