You are here: Re: How do I check if javascript is enabled in PHP? « All PHP « IT news, forums, messages
Re: How do I check if javascript is enabled in PHP?

Posted by ZeldorBlat on 10/04/07 11:59

Benjamin wrote:
> you use a function called get_browser()
> it takes no parameters and anaylzes the HTTP_USER_AGENT
> it return an assoctive array
> you check "javascript" key and if it is set to 1 then javascript is
> enabled
> For example:
> $results = get_browser();
> if ($results["javascript"] == 1) {
> echo "You have javascript";
> }
>
> One thing you need to now is you must set the browscap.ini in your
> php.ini file to the location of you browscap.ini. You can get one at
> http://browsers.garykeith.com/downloads.asp
>
> Happy detection
> Jim wrote:
> > How do I check if javascript is enabled in PHP?
> >
> > TIA,
> >
> > Jim

Of course that will only tell you if the browser /supports/ JavaScript
-- not whether it is actually enabled or not.

Your best bet is probably to use JavaScript to do something like set a
form variable then check if that variable got set when you process the
form.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация