From 36d9b47e5c20ae3bc71c0bd0eaf289b566d0cf7c Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 11 Mar 2006 05:21:20 +0000 Subject: fix the progressbar bug with multiple progressbar forms on a page --- httemplate/elements/progress-init.html | 3 ++- httemplate/elements/xmlhttp.html | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index ba9f6edd6..efebe48e9 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -14,7 +14,8 @@ <%= include('/elements/xmlhttp.html', 'method' => 'POST', 'url' => $action, - 'subs' => [ $key.'start_job' ], + 'subs' => [ 'start_job' ], + 'key' => $key, ) %> diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index 28130e501..e03438822 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -4,6 +4,7 @@ my $url = $opt{'url'}; my $method = exists($opt{'method'}) ? $opt{'method'} : 'GET'; #my @subs = @{ $opt{'subs'}; + my $key = exists($opt{'key'}) ? $opt{'key'} : ''; $url .= ( ($url =~ /\?/) ? '&' : '?' ) if $method eq 'GET'; @@ -38,10 +39,10 @@ %> - function <%=$func%>() { + function <%=$key%><%=$func%>() { // count args; build URL var url = "<%=$furl%>"; - var a = <%=$func%>.arguments; + var a = <%=$key%><%=$func%>.arguments; var args; var len; -- cgit v1.2.1