
- Forum
- Programming Talk
- Java
- Browser Based
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 ...
-
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.
-
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);
.........................
................................
«
Debugging Code
|
About SOA
»

Reply With Quote





