HTML::DragAndDrop - Basic Image

Home » Tutorials » HTML::DragAndDrop talk
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use HTML::DragAndDrop;

my $q = new CGI;

my $dd = HTML::DragAndDrop->new(
  javascript_dir => '/javascript/',
);

print $q->header;

print $q->start_html(
  -title => 'HTML::DragAndDrop',
  -style => {-src => '/style/draganddrop.css'},
);

print $q->h2("HTML::DragAndDrop");
print q(<div id="next"><a href="/cgi-bin/draganddrop/example02.pl">Next</a></div>);


$dd->add_dragable(
 name  => 'dragable1',
 src   => '/images/SmlNarcissus.png',
 width => 124, height => 180,
);

print $dd->output_html;
print $dd->output_script;


print $q->end_html;
dragable1