Re: How define if javascript is on with php
| From: | Peter Lind | Date: | Fri, 16 Apr 2010 11:57:59 +0000 |
| Subject: | Re: How define if javascript is on with php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-304130@lists.php.net to get a copy of this message | ||
Javascript is client-side - only way to detect it is to have a page
send back information (post/get). What might work easiest is to have
jquery look for a given cookie upon page render, and if it doesn't
find it, then do an ajax call to the server. On the server side,
initiate a session for the user, set "using_javascript" to false and
update to true if you receive the ajax call.
That aside, why would you need to know in the backend if a user is
running javascript?
On 16 April 2010 13:50, Paulo-WORK <pauloworkmail@googlemail.com> wrote:
> Hello and thanks for any replies that this message may get.
> I have a issue to solve regarding PHP.
> My website relies heavlly on jquery and does not dowgrade properly.
> I use codeigniter framework as this website has a backend .
> Is it possible to detect if js is on with php?
> And if so can it be set into a variable?
> Paulo Carvalho
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>