Questions tagged [cross-browser]

Cross-browser development refers to the practice of building web sites, web applications, libraries, or components so that they function across different web browsers and rendering engines.

Cross-browser development refers to the practice of building web sites, web applications, libraries, or components so that they function across different web browsers and rendering engines. This contrasts with the concept of developing for one browser or engine.

9067 questions
97
votes
16 answers

Cross Browser Flash Detection in Javascript

Does anyone have an example of script that can work reliably well across IE/Firefox to detect if the browser is capable of displaying embedded flash content. I say reliably because I know its not possible 100% of the time.
Ta01
  • 31,040
  • 13
  • 70
  • 99
95
votes
3 answers

How to position a div in bottom right corner of a browser?

I am trying to place my div with some notes in the bottom right position of the screen which will be displayed all time. I used following css for it: #foo { position: fixed; bottom: 0; right: 0; } It works fine with Chrome 3 and…
KoolKabin
  • 17,157
  • 35
  • 107
  • 145
93
votes
6 answers

Which HTML5 tags can I use without worrying about browser compatibility?

I am building a web app for use on PCs. What are the HTML5 tags to stay away from to prevent compatibility issues with Browsers like IE8 and above? Note: Most questions are 1-3 years old on this subject.
Swagg
  • 1,194
  • 2
  • 14
  • 18
93
votes
8 answers

Is cross-origin postMessage broken in IE10?

I'm trying to make a trivial postMessage example work... in IE10 between windows/tabs (vs. iframes) across origins Remove any one of these conditions, and things work fine :-) But as far as I can tell, between-window postMessage only appears to…
Bosh
  • 8,138
  • 11
  • 51
  • 77
92
votes
7 answers

Uncaught TypeError: Object.values is not a function JavaScript

I have a simple object like the one below: var countries = { "Argentina":1, "Canada":2, "Egypt":1, }; I need to create two arrays. The first array is an array of all the keys from the object. I created this array by: var labels =…
Alex Fallenstedt
  • 2,040
  • 1
  • 18
  • 34
89
votes
13 answers

How to add/remove a class in JavaScript?

Since element.classList is not supported in IE 9 and Safari-5, what's an alternative cross-browser solution? No-frameworks please. Solution must work in at least IE 9, Safari 5, FireFox 4, Opera 11.5, and Chrome. Related posts (but does not contain…
Pacerier
  • 86,231
  • 106
  • 366
  • 634
86
votes
13 answers

Intercepting call to the back button in my AJAX application

I have an AJAX app. A user clicks a button, and the page's display changes. They click the back button, expecting to go to the original state, but instead, they go to the previous page in their browser. How can I intercept and re-assign the back…
Zack Burt
  • 8,257
  • 10
  • 53
  • 81
85
votes
12 answers

How can I zoom an HTML element in Firefox and Opera?

How can I zoom an HTML element in Firefox and Opera? The zoom property is working in IE, Google Chrome and Safari, but it’s not working in Firefox and Opera. Is there any method for adding this property to Firefox and Opera?
SABU
  • 3,697
  • 4
  • 18
  • 11
85
votes
9 answers

Correct way to use Modernizr to detect IE?

I wanted to use the Modernizr JS library to detect for some browser properties to determine what content to show or not show. I have an app called Pano2VR which outputs both HTML5 and SWF. I need the HTML5 for iOS device users. However, IE does not…
Steve
  • 14,401
  • 35
  • 125
  • 230
84
votes
4 answers

How can I download WOFF files from Google Fonts?

Google Fonts seems to only offer fonts in WOFF2. While this works fine with Chrome, WOFF2 doesn't seem to be supported by many other browsers Is there a way to directly link to Google fonts hosted on their CDN in a format other than WOFF2?
cantsay
  • 1,967
  • 3
  • 21
  • 34
83
votes
23 answers

Enter key press behaves like a Tab in Javascript

I'm looking to create a form where pressing the enter key causes focus to go to the "next" form element on the page. The solution I keep finding on the web is...
Ross
  • 3,709
  • 8
  • 35
  • 33
82
votes
8 answers

Highcharts chart option backgroundColor:'transparent' showing black on IE 8

Highcharts chart option backgroundColor:'transparent' showing black on IE 8 histogram = new Highcharts.Chart({ chart: { renderTo: 'histogram', defaultSeriesType: 'bar', backgroundColor:'transparent' …
Nikshep
  • 2,117
  • 4
  • 21
  • 30
82
votes
14 answers

HTML: how to force links to open in a new tab, not new window

I use target="_blank" to open links in a new tab. But in IE it opens a new window which is completely logical because that is what _blank is supposed to do. And i don't know how target="_blank" behaves in other browsers. Is there something to force…
Moon
  • 19,518
  • 56
  • 138
  • 200
81
votes
3 answers

How can I make event.srcElement work in Firefox and what does it mean?

there is an if statement on my company's website that makes one web page imcompatible with firefox if(event.srcElement.getAttribute("onclick") == null){ ...code.. document.mainForm.submit(); } I've commented out the if statement conditions and now…
124697
  • 22,097
  • 68
  • 188
  • 315
80
votes
3 answers

Cross-browser bookmark/add to favorites JavaScript

Is there any cross-browser bookmark/add to favorites using JavaScript. Searched for some list but none is working. Can you please suggest any?
Aakash Chakravarthy
  • 10,523
  • 18
  • 61
  • 78