IT Community - Software Programming, Web Development and Technical Support

Multi-Browser Compatibility

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...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Web Design Help

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 11-26-2007, 08:51 PM
santhakumar santhakumar is offline
D-Web Genius
 
Join Date: Mar 2007
Posts: 927
santhakumar is on a distinguished road
Default Multi-Browser Compatibility

Examples of Multi-Browser Compatibility
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-27-2007, 02:28 AM
srikumar_l srikumar_l is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 196
srikumar_l is on a distinguished road
Default Browser Detection Using Navigator Object Properties

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-27-2007, 09:16 PM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Multi-Browser Compatibility

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...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -7. The time now is 06:55 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0