[webmin-devel] (no subject)

"Michael Wray" <[email protected]>
Newsgroups gmane.comp.web.webmin.devel,gmane.comp.web.webmin.general
Message-ID <[email protected]>
Ok, in an attempt to fix the session_login problem of the login showing in
two frames, or after relogging in, one frame not refreshing properly...I
have the following:

in my theme config I have "two" headinclude lines..I don't know if this is
legal, but it "appears" to work:

headinclude=config.css
headinclude=framecheck.inc


framecheck.inc has the following in it:
<script language="JavaScript" type="text/javascript">
passpage = document.URL
if (top.location == self.location)
        if (! (self.location == "session_login.cgi"))
        if (document.URL.match("aim_"))
        top.location.href="/index.cgi?" + passpage
</script>



index.cgi in the theme contains the following:
#!/usr/bin/perl
###########################################################################
#
# Autors: Deepen V. Dhulla <[email protected]>
#         Peter N. Hrebicek <[email protected]>
#
############################################################################

require './web-lib.pl';
&init_config();

$hostname = &get_system_hostname();
$ver = &get_webmin_version();
if ($gconfig{'real_os_type'}) {
        $ostr = "$gconfig{'real_os_type'} $gconfig{'real_os_version'}";
        }
else {
        $ostr = "$gconfig{'os_type'} $gconfig{'os_version'}";
        }

&PrintHeader();

print <<"EOF";

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
        <head>
                <title>Webmin</title>
        </head>

<!--
         <frameset border="0" cols="295, *" frameborder="0">
                <frame name="nav" target="main" src="navigate.cgi">
                <frame name="content" src="home.cgi">
        </frameset>
-->
 <script language="JavaScript" type="text/javascript">

origURL = parent.document.URL
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
document.write('<frameset border="0" cols=295, *" frameborder="0"><frame
src="na
vigate.cgi"
name="nav" target="main" ><frame src=\"' + contentURL + '\"
name="content"><\/fr
ameset>')

</script>

</html>

EOF



I have modified session.cgi by inserting the following line at line 32:
print "<script>\nif (window != window.top) {\n
       window.top.location = window.location;\n        }\n</script>\n";

What it does:

   session_login.cgi is now always appropriately loaded as top window.

Bugs:   Ocassionaly the "main" frame becomes the top window.  When the
session expires, and you click on something, I can here the reload "click"
happening for about 10 seconds and can see the URL being modified rapidly
for the entire time.  Eventually you get to the session_login screen.


Any ideas on how to fix this?  (I had assumed that sometimes for some
reason, the call to &header is not including the javascript..but upon html
code inspection it is called, but apparently ignored.)

Michael Wray
S4F Technologies, Inc.
2448 S. 81st St.
Tulsa, OK 74137
http://www.s4f.com
mailto:[email protected]




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.