Re: javascript check

From: Date: Thu, 19 Oct 2000 14:53:08 +0000
Subject: Re: javascript check
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21167@lists.php.net to get a copy of this message
well, I was hoping that I could detect that a user has turned off javascript. If not, my program should give a warning that this page needs javascript. Maybe there is a HTML solution for this problem??? Tijmen On Thu, 19 Oct 2000 joe@jWebMedia.com wrote: > While PHP can tell if you a certain browser is capable of JavaScipt it > cannot tell you if Javascript is indeed turned on. The get_browser() > function looks to a browscap.ini file on your server. It gets the > HTTP_USER_AGENT into and checks it against the file and says, "yes, > Netscape 4.5 has javascript support", but that's it. Whether or not its > on is unknown. Put the browscap.ini file somewhere on your server, and > in the php.ini file, point the browscap to that file. Do a $browser = > get_browser(); > if ($browser["javascript"]) { > some code; > } > > It should return true even if Javascript is turned off in your browser. > Hope this helps, > > Joe > > > -- Customer: I'm running Windows '98 Tech: Yes. Customer: My computer isn't working now. Tech: Yes, you said that.

« previous php.general (#21167) next »