Topics Search

Browser Version Control

Browser Version Control
Views: 184
There are different browsers and versions out there. Thus you, the programmer, do not know what JavaScript capabilities the user has. Insuring that the scripts you write run in most users browsers can be done in a few different ways.One way is to use JavaScript to check which browser they are using, and then program accordingly. This is the most common way to avoid any scripting error.
Sponsored Links:

More topics

 

Document and Events

Preview
Browser allows a programmer to control itself by exposing an hierarchy of objects. In this section we’ll learn how to make use of them to query and manipulate the page. The browser provides us with a hierarchy of objects which we can use to control and access various information about time, screen, page, elements on a page etc.
 

Resize Browser Windows

Preview
Popup blockers are so popular these days that many browsers build them right into their infrastructure. A popup is simply a browser window that opens while you’re viewing another browser window. While some sites open popups that display advertising, others use popups to display helpful information. For instance, you might want site visitors to view a small popup that shows a map or table. The following code creates and opens a new popup browser window that you can control...
 

Getting information about the browser with JavaScript

Preview
If you've been looking for a way to give cutting-edge content to visitors with the latest browsers, yet not leave users with older browsers out in the cold, detecting browser version, platform, and capabilities with JavaScript may be the answer.
 

Browser environment

Preview
The browser provides us with a hierarchy of objects which we can use to control and access various information about time, screen, page, elements on a page etc. On the top is the window, also called global object. All other objects form 3 groups: Document Object Model, Browser Object Model, JavaScript Objects and Functions...
 

JavaScript Browser Detection

Preview
Browser detection allows you to find out what browser your viewer is using, and then perform a script based on it-- or just to send a friendly message to those with your favorite browser.
 

JavaScript Error- and XHR Log Recording With Every Bug Report

Preview
What a developer will need to fix the problem quickly, WITHOUT asking the user difficult questions: Screen size, plugins, installed on your browser, URL where the problem happened, OS and Browser version. A visual and annotated screenshot showing where exactly is the problem and how it looks like through the user’s eyes with all steps on how to reproduce the bug...
 

Javascript On Page Load Example

Preview
The onload event is a function or code that is executed after the page or window is fully loaded. But why do we use it? Generally, it is used to deal with cookies, or to display a certain version of the page according to the user’s browser type and/or version. The onload event, having a relatively easy syntax, is really easy to use.
 

Get viewport/window size (width and height)

Preview
Space within the browser window is known as the 'viewport' affected by the monitor resolution, how many toolbars are in use within the browser and whether the browser is in full screen or windowed mode.
 

JavaScript Redirection

Preview
Redirection is often used to take viewers to a page depending on their browser's name or version. To redirect a viewer instantly, you just need to add a short command in your head section.
 

Browser window properties and methods

Preview
The dualistic window object provides global JavaScript object and browser window interface. In this section we concentrate on the browser part. Window has a lot in common with DOM elements. Many events ultimately bubble to window and can be caught by its handlers.