[PHP] Detecting JavaScript
Who can give me a PHP-Script to detect if JavaScript is enabled? It should work with both, IE and NN! thanks -- Ihr WEBberater Stuttgarter Str.3, D-73033 Göppingen Tel. +49(0)7161-929594 - Fax. +49(0)7161-929598 http://www.wa-p.de ** mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Detecting JavaScript
I think phpclient sniffer can do that... found here: http://www.php.net/manual/en/ref.imap.php mitch - Original Message - From: Jochen K?chelin <[EMAIL PROTECTED]> Date: Saturday, February 24, 2001 10:37 pm Subject: [PHP] Detecting JavaScript > Who can give me a PHP-Script to > detect if JavaScript is enabled? > > It should work with both, IE and NN! > > thanks > > -- > Ihr WEBberater > Stuttgarter Str.3, D-73033 Göppingen > Tel. +49(0)7161-929594 - Fax. +49(0)7161-929598 > http://www.wa-p.de ** mailto:[EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: php-list- > [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Detecting JavaScript
wps didn't check to see what was in my paste buffer sorry: http://www.asphyxia.com/ mitch - Original Message - From: Ed Lazor <[EMAIL PROTECTED]> Date: Saturday, February 24, 2001 11:12 pm Subject: Re: [PHP] Detecting JavaScript > I couldn't find anything about phpclient sniffer on that page. Is > that the > right page? > > -Ed > > At 10:54 PM 2/24/2001 -0600, you wrote: > >I think phpclient sniffer can do that... > > > >found here: http://www.php.net/manual/en/ref.imap.php > > > >mitch > > > >- Original Message - > >From: Jochen K?chelin <[EMAIL PROTECTED]> > >Date: Saturday, February 24, 2001 10:37 pm > >Subject: [PHP] Detecting JavaScript > > > > > Who can give me a PHP-Script to > > > detect if JavaScript is enabled? > > > > > > It should work with both, IE and NN! > > > > > > thanks > > > > > > -- > > > Ihr WEBberater > > > Stuttgarter Str.3, D-73033 Göppingen > > > Tel. +49(0)7161-929594 - Fax. +49(0)7161-929598 > > > http://www.wa-p.de ** mailto:[EMAIL PROTECTED] > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: php-list- > > > [EMAIL PROTECTED] > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > >To contact the list administrators, e-mail: php-list- > [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Detecting JavaScript
PHP won't be able to tell you if JavaScript is enabled or not. PHP can only determine what version of JavaScript is supported based on the browser information provided in HTTP_USER_AGENT. Trevor DeVore Blue Mango Multimedia > > > > > > > Who can give me a PHP-Script to > > > > detect if JavaScript is enabled? > > > > > > > > It should work with both, IE and NN! > > > > > > > > thanks > > > > > > > > -- > > > > Ihr WEBberater > > > > Stuttgarter Str.3, D-73033 Göppingen > > > > Tel. +49(0)7161-929594 - Fax. +49(0)7161-929598 > > > > http://www.wa-p.de ** mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Detecting JavaScript
Nothing tested, just off the top of my head. The single most reliable way to do that would be to have a page that runs JavaScript. For instance, if the JavaScript executes, it redirects to your JavaScript enabled page, if not, the page does a refresh to a non JavaScript enabled page. tester> window.location('<A HREF="http://some.javascript.enabled.page">http://some.javascript.enabled.page</A>'); The trick would be a matter of timing, the JavaScript must successfully execute before the timer runs out on the refresh tag. You can of course get much fancier, changing the redirect based on the client information that PHP has available. PHP could effectively write the JavaScript to the page based on the known capabilities of the client. For instance the refresh tag is generally useless for browsers like Lynx, as is the JavaScript. Alternatively, you could (just supposing now...) have the first page do an instant refresh, using JavaScript to trigger a value in PHP. If the value is set, JavaScript was enabled, if it is not, JavaScript was turned off. But I've not tried it. DAve -- Dave Goodrich Director of Interface Development Reality Based Learning Company 9521 NE Willows Road, Suite 100 Redmond, WA 98052 Toll Free 1-877-869-6603 ext. 237 Fax (425) 558-5655 [EMAIL PROTECTED] http://www.rblc.com > From: Jochen Kächelin <[EMAIL PROTECTED]> > Reply-To: <[EMAIL PROTECTED]> > Date: Sun, 25 Feb 2001 05:37:17 +0100 > To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> > Subject: [PHP] Detecting JavaScript > > Who can give me a PHP-Script to > detect if JavaScript is enabled? > > It should work with both, IE and NN! > > thanks > > -- > Ihr WEBberater > Stuttgarter Str.3, D-73033 Göppingen > Tel. +49(0)7161-929594 - Fax. +49(0)7161-929598 > http://www.wa-p.de ** mailto:[EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Detecting JavaScript
this is a function that is BUILT-IN to HTML for the last few versions. //some script here -- this will redirect non-javascript browsers to a non-javascript page. DanO -Original Message- From: Dave Goodrich [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 8:56 AM To: [EMAIL PROTECTED] Cc: php Subject: Re: [PHP] Detecting JavaScript Nothing tested, just off the top of my head. The single most reliable way to do that would be to have a page that runs JavaScript. For instance, if the JavaScript executes, it redirects to your JavaScript enabled page, if not, the page does a refresh to a non JavaScript enabled page. tester> window.location('<A HREF="http://some.javascript.enabled.page">http://some.javascript.enabled.page</A>'); The trick would be a matter of timing, the JavaScript must successfully execute before the timer runs out on the refresh tag. You can of course get much fancier, changing the redirect based on the client information that PHP has available. PHP could effectively write the JavaScript to the page based on the known capabilities of the client. For instance the refresh tag is generally useless for browsers like Lynx, as is the JavaScript. Alternatively, you could (just supposing now...) have the first page do an instant refresh, using JavaScript to trigger a value in PHP. If the value is set, JavaScript was enabled, if it is not, JavaScript was turned off. But I've not tried it. DAve -- Dave Goodrich Director of Interface Development Reality Based Learning Company 9521 NE Willows Road, Suite 100 Redmond, WA 98052 Toll Free 1-877-869-6603 ext. 237 Fax (425) 558-5655 [EMAIL PROTECTED] http://www.rblc.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]