[SPAM] Re: [mod_python] Newbie - Screen resoultion

Dan Eloff dan.eloff at gmail.com
Thu Feb 16 18:33:05 EST 2006


Like Joshua pointed out, there shouldn't be a need to get the client's
screen resolution. If you feel you need it, it's a good indication there's
something wrong with your design.

If you're returning a vertical list, and you were thinking of breaking it
into columns on wider screens, the same can be accomplished very simply with
left floated divs. If the browser is narrow, they will stack up under each
other, if it is wide they will float next to each other like columns.
Simpler than a javascript, cleaner, and it will work without javascript
enabled or if the browser fills only part of the screen.

-Dan

On 2/16/06, Jim Steil <jim at qlf.com> wrote:
>
> The only reason I want to determine the screen resolution is so that when
> returning lists I can adjust my paging to fill pages more effectively.  I
> know that this assumes the browser is maximized but for the people that will
> be using this app, this is acceptable.  Thanks for the response, I should
> have realized it myself.  At least now I can go on just using the javascript
> implementation.  Thanks.
>
>     -Jim
>
> Jim Steil
> IT Manager
> Quality Liquid Feeds
> (608) 935-2345
>
>
> Joshua Ginsberg wrote:
>
> Using mod_python does not make apache suddenly clairvoyant. The request
> object only has access to what the HTTP request tells it, and screen
> resolution is nowhere in that protocol. The javascript you refer to runs
> *inside* the client browser, which *does* have access to such
> information. This is the only way to do what you're asking.
>
> As an aside, I've never seen a good use for determining client screen
> resolution. You should consider carefully your design and decide if this
> is really necessary or if you're using it to compensate for some other
> design decision that simply flawed.
>
> -jag
>
> On Thu, 2006-02-16 at 11:09 -0600, Jim Steil wrote:
>
>  Is there a way through mod_python for me to determine the screen
> resolution of my web client machine?  I know I can get this via
> javascript, but was hoping there was a way to get it through the
> request object or something.  If you could point me to the appropriate
> documentation, I'd really appreciate it.  Or, if this simply isn't
> possible, I like to know that.  Thanks in advance for your help.  I've
> already searched a years worth of the archives and reread through the
> manual, but can't seem to find anything.  Maybe my terminology is
> bad....
>
>     -Jim
> --
> Jim Steil
> IT Manager
> Quality Liquid Feeds
> (608) 935-2345
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.orghttp://mailman.modpython.org/mailman/listinfo/mod_python
>
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060216/507a9165/attachment.html


More information about the Mod_python mailing list