Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

singingfish (7494)

  (email not shown publicly)

Journal of singingfish (7494)

Friday June 01, 2007
06:36 AM

Catalyst Javascript Testbed

[ #33398 ]
Quick way to get a javascript testbed going:

$ MyApp
$ cd MyApp

# put this in MyApp::Controller::Root

sub default : Path {
        my ( $self, $c, $arg ) = @_;

        unless ($arg =~ /boo|hoo|snoo/) {
                $c->res->body('404 not found');
        else {
                $c->res->header('Content-Type', 'text/plain');

sub index : Private {
        my ($self, $c) = @_;

# download your js libraries of choice (jquery here) to root/static/js (create dir as nescessary)
# And in /static/index.htm <-- NOTE the lack of 'l' at the end - there is a reason for this!

<script src="/static/js/jquery-1.1.2.pack.js"></script>
<script type="text/javascript">
    jq = jQuery.noConflict(); // your stuff here :-)
# your html here pre-written or inserted with js debugger

Woosh, off we go...
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.