summaryrefslogtreecommitdiff
path: root/httemplate/elements/progress-init.html
diff options
context:
space:
mode:
authorivan <ivan>2008-03-31 23:19:22 +0000
committerivan <ivan>2008-03-31 23:19:22 +0000
commit12eb930abf31078c68dbf7eb94865faa1c59fc9e (patch)
tree81ae742dfee9c37c240c24b283867a676b984ec1 /httemplate/elements/progress-init.html
parentc493f7cb5666611a7580394999461bc01577b514 (diff)
overlib include
Diffstat (limited to 'httemplate/elements/progress-init.html')
-rw-r--r--httemplate/elements/progress-init.html45
1 files changed, 23 insertions, 22 deletions
diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html
index 1c96a54..2cde86f 100644
--- a/httemplate/elements/progress-init.html
+++ b/httemplate/elements/progress-init.html
@@ -1,17 +1,3 @@
-%
-% my( $formname, $fields, $action, $url_or_message, $key ) = @_;
-% $key = '' unless defined $key;
-%
-% my $url_or_message_link;
-% if ( ref($url_or_message) ) { #its a message or something
-% $url_or_message_link =
-% 'message='. uri_escape( $url_or_message->{'message'} )
-% } else {
-% $url_or_message_link = "url=$url_or_message";
-% }
-%
-
-
<% include('/elements/xmlhttp.html',
'method' => 'POST',
'url' => $action,
@@ -19,14 +5,10 @@
'key' => $key,
)
%>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_iframe.js"></SCRIPT>
+
+<% include('/elements/init_overlib.html') %>
+
<SCRIPT TYPE="text/javascript">
-function OLiframeContent(src, width, height, name) {
- return ('<iframe src="'+src+'" width="'+width+'" height="'+height+'"'
- +(name?' name="'+name+'" id="'+name+'"':'')+' scrolling="auto">'
- +'<div>[iframe not supported]</div></iframe>');
-}
function <%$key%>process () {
@@ -78,8 +60,27 @@ function <%$key%>process () {
function <%$key%>myCallback( jobnum ) {
- overlib( OLiframeContent('<%$p%>elements/progress-popup.html?jobnum=' + jobnum + ';<%$url_or_message_link%>;formname=<%$formname%>' , 444, 168, 'progress_popup'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 );
+ overlib( OLiframeContent('<%$p%>elements/progress-popup.html?jobnum=' + jobnum + ';<%$url_or_message_link%>;formname=<%$formname%>' , 444, 168, '<% $popup_name %>'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 );
}
</SCRIPT>
+
+<%init>
+
+my( $formname, $fields, $action, $url_or_message, $key ) = @_;
+$key = '' unless defined $key;
+
+my $url_or_message_link;
+if ( ref($url_or_message) ) { #its a message or something
+ $url_or_message_link =
+ 'message='. uri_escape( $url_or_message->{'message'} )
+} else {
+ $url_or_message_link = "url=$url_or_message";
+}
+
+#stupid safari is caching the "location" of popup iframs, and submitting them
+#instead of displaying them. this should prevent that.
+my $popup_name = 'popup-'.time. "-$$-". rand() * 2**32;
+
+</%init>