Okie I was thinking about this and well... can't figure it out yet.
I want to use javascript layers in a new sitedesign I'm working on and well.. when people (those few idiots) have java switched off, the site gets completely messed up.
How would you make a layer only print out when people have java enabled.
Basicly I am using php to set the layer properties and content already and well it would be easy enough to just put that inside a:
if ($java == "yes"){ } thing. But can you use java to set that variable... I'm sure you can but it's client side... thus only gets processed after the php which would make that point mute.
Basicly I am saying.. can php check for java somehow... and without GET_BROWSER since my host hasn't got it installed.
javascript enabled check?
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Just put content for non-javascript users into <noscript> tags:
and any scripts into comments so that browsers that don't understand javascript don't try to do anything with it:
Mac
Code: Select all
<noscript>Here's content for those people using text-to-speech readers and other browsers that can't understand javascript. I (lc) understand that you are not idiots and may have very good reasons for not having javascript enabled and have accordingly made my site more accessible by using <noscript> tags.</noscript>Code: Select all
<script language="JavaScript">
<!-- Hide code from older browsers
lots of lovely page bloating javascript
//-->
</script>