On 6/15/07, Phill Sparks <[EMAIL PROTECTED]> wrote:
>
> On 15/06/07, Gordon Stewart <[EMAIL PROTECTED]> wrote:
> >
> > Is there any PHP (or Javascript code ) that can detect if Javascript
> > is turned on - & then if its off - Do something ?
> >
>
> The only way I know to do this is by getting javascript to "ping" the
> server (simple XMLRequest) and then store the response in the _SESSION
> ready to be inspected later. The only problem with this is that there
> will be add a 1 page lag to your script's knowledge about the
> prescence of JavaScript.
>
> Phill
Thanks - I'll check the XMLRequest tomorow ....
though - I have found this small Javascript - Maybe use it to set a
cookie - & use the rest of the PHP to find the cookie (& "refresh"
HTML command) - to determine what to do...
thanks...
================================
function client_data(info)
{
if (info == 'js' )
{
document.write('<p class="right-bar">JavaScript is
enabled.</p>');
}
}
</script>
<h4 class="right-bar">JavaScript</h4>
<script type="text/javascript">
client_data('js');
</script>
<noscript>
<p class="right-bar">JavaScript is disabled</p>
</noscript>
================================
--
G
NZ community groups - [EMAIL PROTECTED]
Freecycle Auckland :-
http://groups.yahoo.com/group/AucklandFreecycle/