PDA

View Full Version : Sniffer js



kjaada
18-01-2008, 04:00 PM
Have a webpage that has a drop down menu and a sniffer to determine the browser being used.The sniffer java scrips only go up to IE5 how can I get the scripts for 6 and 7 as I can not find the site that supplied the menu.

sal
18-01-2008, 06:30 PM
why do you sniff and how is the drop-down menu relevant?

Edit: Is this your drop-down menu (http://www.dynamicdrive.com/dynamicindex1/topmen3/) (I just surfed "sniffer.js").

kjaada
18-01-2008, 06:48 PM
The sniffer was part of the menu package and it was necessary to "sniff"different browsers.It does not matter now as I have done away with the dropdown.It would not work with IE6 or IE7

sal
18-01-2008, 09:51 PM
The sniffer was part of the menu package and it was necessary to "sniff"different browsers.It does not matter now as I have done away with the dropdown.It would not work with IE6 or IE7
"Browser sniffing" concerning JS in this context is generally considered old-tech, nowadays it's more common practice to "try" a browsers support for certain functions and take it from there.

Also, basic drop-downs can be achieved with basic HTML and CSS (http://www.htmldog.com/articles/suckerfish/dropdowns/) with minimal JS only to bring support for IE6. And with a little extra JS elbow (http://users.tpg.com.au/j_birch/plugins/superfish/), provide extra flashiness without too much hassle.