![]() |
Passing users screen resolution through as a variable
I need users screen width as a variable in an tpl file.
FI. {if $var eq "1024"}Do This{else}DO THAT{/if} Can this be done? |
|
hi balinor,
I know, but how do it pass the javascript var through to smarty (as a smarty var) |
According to the documentation you should be able to pass this to the script...
Code:
<SCRIPT language="JavaScript"> Then what I would do is right above this line in home.php Code:
# I might write something like this: Code:
$res = $_GET['res']; Then you should be able to use... {if $res eq 'high'} Some Code Here {else} Some More code Here {/if} |
thanks,
i will try it later today.... |
All times are GMT -8. The time now is 06:37 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.