[dancer-users] How do I call a script from a template?
WK
wanradt at gmail.com
Fri May 1 09:56:24 BST 2015
Hi!
2015-04-30 1:12 GMT+03:00 John J. McDermott, CPLP <jjm at jkintl.com>:
> In a template I invoke (successfully) from a Dancer2 path I have some jquery
> that works outside Dancer2:
Like Andrew pointed, you don't call anything from template, you use
template to generate HTML-page, which contains javascript and
client/browser makes separate request to get some content from server.
This content could come from other route or from other server,
whatever. So, instead of script data1.pl seems reasonable to have a
route in your Dancer app, which answers to those requests.
Client side (javascript in browser) does not know anything of your
serverside content generation, so templates do not matter here.
--
Wbr,
Kõike hääd,
Gunnar
More information about the dancer-users
mailing list