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 | 78dd0fe44826761f93785f73ab5b7fdc88e2c4ea (patch) | |
tree | 0a540b1e1b6a246d8d693d244168091f6fbc59f5 /source3/web | |
parent | c8c61ac6a643d1c51c1546a6e346c566bb34f3b2 (diff) | |
download | samba-78dd0fe44826761f93785f73ab5b7fdc88e2c4ea.tar.gz samba-78dd0fe44826761f93785f73ab5b7fdc88e2c4ea.tar.bz2 samba-78dd0fe44826761f93785f73ab5b7fdc88e2c4ea.zip |
moved the refresh script to the end of the page so that silly things
like a refresh of 0 actually work.
(This used to be commit 4c04e1d2aea64ba0b53846c04235669eef0b28ca)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/statuspage.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index 98c0982b99..5f89eee43a 100644 --- a/source3/web/statuspage.c +++ b/source3/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"); + } } |