[pmwiki-users] IE ccs compatability
Hans
design5 at softflow.co.uk
Thu Apr 12 07:07:43 CDT 2007
Thursday, April 12, 2007, 12:59:42 PM, Tegan wrote:
> Is it possible to do an if javascript enabled?
> (:if enabled javascript:) stuff that uses it (:else:) alternative,
> non-js way of doing stuff (:if:)
I have done it in Gemini, Fixflow and Triad skins, with a little
trick:
In the skin tmpl template file I put after the <body> tag:
<script type='text/javascript' language='javaScript1.2'><!--
document.cookie = 'javascript=1; path=/';
--></script>
This will set a cookie named javascript to 1
And in the skin's php file i set:
global $javascript;
if (isset($_COOKIE['javascript'])) $javascript = $_COOKIE['javascript'];
With this I got a global $javascript php variable, which I can use as
a switch for all subsequent windows the browser gets served. But it
fails on the first serving, as php dos not know if a browser got
javascript enabled.
~Hans
More information about the pmwiki-users
mailing list