Re: How define if javascript is on with php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16 April 2010 13:54, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 2010-04-16 at 12:50 +0100, Paulo-WORK 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
>>
>
>
> Nope, Javascript is on the client side and PHP is on the server. The
> server has very little knowledge of the client, and what information is
> sent (browser type, etc) can't be relied upon because browsers are
> capable of lying about what they are (in order to make themselves appear
> as IE for example)
>
> JQuery should allow the site to fail gracefully into a non-Javascript
> version, because of the way the framework is built.
>
> If this is something that you cannot easily do, why don't you just have
> PHP output some sort of default message that the site does not work
> without Javascript and use CSS to hide the rest of the site that
> requires script. Then, in JQuery, it's simple to hide the message and
> show the site with a couple of lines of code.

Or use the <noscript> tag


-- 
<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>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux