ript objects to help quickly create
a customized GUI interface for Apache::UploadMeter using the JSON meter type
=head1 DOM, JavaScript and Cascading StyleSheet rules
Although we aim to give ma
you're using
MeterType JSON, this will be embedded in your JavaScript as I<meter_id>. The
third parameter is the URL of the meter-status URL. If you're using
MeterType JSON, this will be embedded
ache2::RequestIO ();
use Apache2::Response ();
use Apache2::Const -compile=>qw(:common);
sub json_popup {
my $r = shift;
$r->content_type("text/html");
$r->set_etag();
return
port, json) {
this.each(function(responder) {
if (typeof responder[callback] == 'function') {
try {
responder[callback].apply(responder, [request, transport, json]);
{
var state = Ajax.Request.Events[readyState];
var transport = this.transport, json = this.evalJSON();
if (state == 'Complete') {
try {
this._complete = true;
'on' + (this.success() ? 'Success' : 'Failure')]
|| Prototype.emptyFunction)(transport, json);
} catch (e) {
this.dispatchException(e);
}
if ((this.getHeader(
ache2::RequestIO ();
use Apache2::Response ();
use Apache2::Const -compile=>qw(:common);
sub json_css {
my $r = shift;
$r->content_type("text/css");
$r->set_etag();
return Apa
Jan 23, 2007 - Internalized XML resources. This is 1.00RC1
# 0.99_13 : Feb 11, 2007 - Initial JSON support + initial UploadMeter object in JavaScript
# 0.99_14 : Feb 15, 2007 - Fixed config issu
ortable; that's one of the reasons we support it
# Although I expect 95% of users to use the JSON response, those same 95%
# of the users are going to be using the bundled JS code, or forkin
| $currenttime;
# JSON response
if ($format=~/^json$/i) {
# Hardcode object for now. No need to require YAML or YAML::Syck as prereq
my $json=sprintf('{"meter_id":"%s"