Here is the solution I went with. Thanks to everyone for their assistance. It is very appreciated!
In my HTML::Template, I have a login section. If you are not logged in (ie, we can't find a session_id cookie in your browser), we send the following to your browser:
[HTML building some tables and the top-of-page navigation]
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
function fill_in_screensize() {
document.forms['login_form'].screen_width.value=screen.width;
document.forms['login_form'].screen_height.value=screen.height;
return true;
}
</SCRIPT>
<FORM name=login_form ACTION=[ACTION] METHOD=[METHOD]
<input type=hidden name=screen_width>
<input type=hidden name=screen_height>
[input fields for username and password]
<input type=submit value="submit" onClick='fill_in_screensize();'>
</FORM>
Then, in my perl code, I grab the values with $query->param('screen_width'), dbh->quote it and then stuff it into the user's account record along with the other data I track (ip_address, user-agent string, etc).
I don't believe WebTV supports Javascript but since WebTV displays at less than 544 pixels wide, I can just parse for WebTV user-agent strings to get an idea of how many usrs have a resolution under 640x480.
Wow! The first time Javascript has served a useful purpose in all my years!
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|