This is a discussion on Multi-Browser Compatibility within the Web Design Help forums, part of the Web Development category; Examples of Multi-Browser Compatibility...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi Santhakumar, Try this Example and Tell me How use full was it. <html> <script language="javascript"> // Returns the browser application name // for example, "Microsoft Internet Explorer" or "Netscape" document.write(window.navigator.appName); // Returns the internal code name of the browser // for example, "Mozilla" document.write(window.navigator.appCodeName); // Returns the version of the browser as a string document.write(window.navigator.appVersion); // Returns the user agent string for the browser document.write(window.navigator.userAgent); </script> </html> Thanks With Advance L.Srikumar |
| |||
| Using appVersion with indexOf <html> <script language="javascript"> // Fork for IE 5.5 if(window.navigator.appVersion.indexOf("IE 5.5")!= -1) { document.write("Internet Explorer 5.5") } // Fork for IE 6.0 if(window.navigator.appVersion.indexOf("IE 6.0")!= -1) { document.write("Internet Explorer 6.0") } </script> </html> For example, appVersion in Internet Explorer 6.0 returns the text 4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705). At first sight, this text does not clearly represent the specific browser version. Yet, the version number can be extracted using the built-in JavaScript function indexOf. Using this function with appVersion, you can search for the text 6.0, or 5.5, to distinguish among different Internet Explorer versions, as illustrated in Listing 2. If indexOf does not find a character match, it will return a value of -1.
__________________ Shaalini.S ![]() Be the Best of Whatever you are... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Microsoft Stresses Backward Compatibility in IE8 | senthilkannan | Search Engines | 2 | 08-18-2008 03:08 AM |
| Browser Compatibility | nhoj | Web Design Help | 13 | 04-11-2008 02:24 PM |
| How to get multi combobox value in php | gk_cloud | PHP Programming | 8 | 10-16-2007 12:48 AM |
| compatibility testing | senthilkannan | Software Testing | 20 | 09-11-2007 11:58 PM |
| multi tasking, multi programming, multi threading | vigneshgets | Operating Systems | 1 | 07-18-2007 05:12 AM |