Exforsys

Online Training

Browser Based

This is a discussion on Browser Based within the Java forums, part of the Programming Talk category; I am doing my application using JavaScript. But I want to code my JavaScript application based on the browser. Someone ...


Go Back   Exforsys > Programming Talk > Java

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-02-2007, 04:36 PM
Senior Member
 
Join Date: Apr 2006
Posts: 125
ashlee is on a distinguished road
Smile Browser Based

I am doing my application using JavaScript. But I want to code my JavaScript application based on the browser. Someone tell me how can I code to detect browser so that I can code my JavaScript based on this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-10-2007, 09:27 AM
Senior Member
 
Join Date: Apr 2006
Posts: 122
rachelle is on a distinguished road
Have a variable first declared for getting the browser type. Now define various variables for each of the browser type checking and check whether it is equal to the index type of the variable defined for browser type detected. Among these variables whichever variable retunes a true value would take the path of execution of further code in your JavaScript.
A sample logic is given below:
var test = navigator.test
var a = (userAgent.indexOf('browser1') != -1);
var b = (userAgent.indexOf('browser2') != -1);
.........................
................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

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

BB 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
Tutorial on Silk Test spriya279 Testing Tutorials 2 02-15-2007 07:31 PM
What is the best browser ? insane Chit-Chat 24 06-05-2006 12:45 AM
Technical Support (Voice Based) or Non Technical Voice Based - Chennai techguru Freshers Jobs 0 06-08-2005 07:07 AM
Apple II Csa2 FAQs: Uploading & Downloading, Part 21/25 rubywand@swbell.net Tech FAQ 0 05-04-2004 10:01 AM
[FAQ] FileMaker Pro - database for Macintosh and Windows Martin Trautmann Tech FAQ 0 04-17-2004 08:26 AM


All times are GMT -4. The time now is 11:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.