Hi,
As far as I know you can't do this directly -- javascript is, of course,
executed after the page is rendered, which is WAY after the epl has been executed and
served.
I do have an idea of how you could do it indirectly, though -- on the first
page of your site that someone visits, you could acquire their resolution and save it
for use on subsequent pages by writing an external script call that includes the
resolution, ie:
<script>
document.write('<script
src="/js/screen_res.epl?res='+screen.width+'x'+screen.height+'">');
</script>
and then on screen_res.epl you could save it with %udat
$udat{'resolution'} = $fdat{'res'};
And then you'd have it captured for the users entire session while keeping it
relatively transparent to the user.
Perhaps others will have a niftier solution though -- I am but a lowly web programmer.
Philippe Hall
-----Original Message-----
From: Derrick Spell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 15, 2004 3:52 PM
To: [EMAIL PROTECTED]
Subject: Screen Resolution Detection
Is there a way in perl to detect a users screen resolution? I want to
execute one of two epl files based on the screen resolution. I know I
can do this with Javascript, but I don't think there is anyway to get
the variable from the javascript to the emperl script.
Derrick Spell
Webmaster / Programmer
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]