[dev] Why not use $browser->hasFeature('javascript');

Jan Schneider jan@horde.org
Mon, 9 Sep 2002 10:41:07 +0200


Zitat von "David U." <davidu@everydns.net>:

> In a few places in  templates/edit/edit.inc (and probably others) there
> are
> things like:
> 
> <?php if (($browser->isBrowser('msie') && $browser->getMajor() >= 4) ||
>           ($browser->isBrowser('mozilla') && $browser->getMajor() >= 5)):
> ?>
>   <span id="start_wday"></span>
>   <script language="JavaScript" type="text/javascript">
>    updateWday('start_wday');
>   </script>
> <?php endif; ?>
> 
> Why aren't these just using: $browser->hasFeature('javascript') ?

Because not every javascript capable browser supports dynamic inline texts,
eg. NS 4.x.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft