Tag: firefox

DOMAttrModified doesn't fire

I’m trying to trigger an event handler when a script modifies an input element (text field.) On Internet Explorer, I can use the onpropertychange event, but on Firefox and other browsers there is no such event. So, according to the W3C docs, it seems the DOMAttrModified event does exactly what I want. But it doesn’t […]

Date.getUTCHours() – Different output in Chrome, Firefox and Internet Explorer

Given the following code: var date = new Date(“2014-02-26T15:52:30”); date.getUTCHours(); // Outputs // Chrome: 15 // Firefox: 18 // IE: 18 I’m not sure which date method I should use. Date.getHours returns the correct hour in FF and IE, but incorrect in Chrome. And Date.getUTCHours() is showing me the correct date, but is not ok […]

Cross-browser issue: firefox does not load images from a php file after first load

I have php code that dynamically generates a fresh captcha image. I have an HTML button that refreshes the captcha image with a new one, via a jquery event handler. Clicking the button (and firing the jquery event handler) produces a new image in chrome and safari — but not in firefox. What is different […]

Easiest way to execute local file from Firefox?

I am developing a web application. I would like to extend my error messages (and their backtraces) so that I can click on the mentioned file, and have it opened automatically in my PHP IDE. I would like to make this a easy-to-activate feature so that whoever works on the web application, can easily map […]

firefox svg.getElementById('id')

I’m experimenting with interactive images. I’ve a jquery-ui slider bound to a function which updates the path inside an svg document (embedded in a web page). I’m trying to retrieve the path with: document.getElementsByTagName(‘svg’)[0].getElementById(‘me’).setAttribute(‘d’, “M 30 30 …) This is working fine in Chrome and Safari, but not in Firefox (where I have to use […]

How to let a sidebar execute javascript code from the main document?

I’m working on a firefox sidebar that loads a webpage in the main document. Now i’d like to call a javascript function from the main document in response of a pushed button on the sidebar. How can the sidebar cause the main document to execute one of its javascript functions? So far, I’m having a […]

div nested inside a gives weird innerHTML result in FireFox

In IE 8, jQuery acts as I would expect: $(‘div’,$(‘<a><div></div></a>’)).html(‘test’).html() “test” In FireFox: $(‘div’,$(‘<a><div></div></a>’)).html(‘test’).html() “<a>test</a>” It puts anchors around what I wanted. Does anyone know why this would happen? EDIT: Setting this with plain javascript (i.e. setting innerHTML) causes the problem. So I guess my real question is: why does firefox change what I set? […]

querySelectorAll invalid syntax

Try to execute this 2 code blocks in error console: First one. Outputs NodeList. var selector = “*[data-type=day][data-day=’23’]”; var a = document.querySelectorAll( selector ); alert( a ); Second one. Generates error. var selector = “*[data-type=day][data-day=23]”; var a = document.querySelectorAll( selector ); alert( a ); Why data-type=day is ok syntax and data-day=23 is not? Should attribute […]

Firefox throws error – regular expression too complex

I’m doing a load() on a page using Jquery, using Jquery Minified 1.3.2 and in ff4, it’s telling me regular expression is too complex, and not completing the load. Works with no errors at all in chrome. Any idea what’s going on? Thanks a lot guys!

anchors click function not working in firefox

This code: a = document.createElement(‘a’) a.setAttribute(‘href’,’http://www.google.de’) a.click() works in chrome. It open www.google.de as expected. But in firefox it does nothing. Why and how can it be made to work? I am using firefox 40.0.3 on ubuntu linux 15.04.