diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-03-18 07:44:27 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-03-18 07:44:27 +0000 |
commit | 4c04e1d2aea64ba0b53846c04235669eef0b28ca (patch) | |
tree | bfa73af2ffc126f0c6702e176167ba79f258ff09 /source/web/statuspage.c | |
parent | 9d9b13880963a0e3cf5213ce2a24c52f4a11a472 (diff) | |
download | samba-4c04e1d2aea64ba0b53846c04235669eef0b28ca.tar.gz samba-4c04e1d2aea64ba0b53846c04235669eef0b28ca.tar.xz samba-4c04e1d2aea64ba0b53846c04235669eef0b28ca.zip |
moved the refresh script to the end of the page so that silly things
like a refresh of 0 actually work.
Diffstat (limited to 'source/web/statuspage.c')
-rw-r--r-- | source/web/statuspage.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source/web/statuspage.c b/source/web/statuspage.c index 98c0982b99d..5f89eee43a4 100644 --- a/source/web/statuspage.c +++ b/source/web/statuspage.c @@ -142,15 +142,6 @@ void status_page(void) printf("<input type=submit value=\"Stop Refreshing\" name=norefresh>\n"); printf("<br>Refresh Interval: %d\n", refresh_interval); printf("<input type=hidden name=refresh value=1>\n"); - /* this little JavaScript allows for automatic refresh - of the page. There are other methods but this seems - to be the best alternative */ - printf("<script language=\"JavaScript\">\n"); - printf("<!--\nsetTimeout('window.location.replace(\"%s/status?refresh_interval=%d&refresh=1\")', %d)\n", - cgi_baseurl(), - refresh_interval, - refresh_interval*1000); - printf("//-->\n</script>\n"); } printf("<p>\n"); @@ -242,5 +233,17 @@ void status_page(void) fclose(f); printf("</FORM>\n"); + + if (autorefresh) { + /* this little JavaScript allows for automatic refresh + of the page. There are other methods but this seems + to be the best alternative */ + printf("<script language=\"JavaScript\">\n"); + printf("<!--\nsetTimeout('window.location.replace(\"%s/status?refresh_interval=%d&refresh=1\")', %d)\n", + cgi_baseurl(), + refresh_interval, + refresh_interval*1000); + printf("//-->\n</script>\n"); + } } |