Tag: firefox

$.each raises error (e is undefined) in Firefox but works fine in Chrome

See this JSFiddle: http://jsfiddle.net/cDVQP/1/ If you have both Chrome and Firefox you can see that it works as expected in Chrome but in Firefox Firebug console you get “TypeError: e is undefined” On JSFiddle the error appears as “TypeError: obj is undefined” I’ve spent hours hunting down this bug and trying to figure it out […]

How to rotate a <select> field through all its <options> using jQuery (Firefox only issue)

It’s almost done but I can’t figure out why this code stop working (rotating the selected option) after completing the first cycle. Here’s my code: HTML <div id=”jsfiddle-container” class=”form-group col-sm-12″> <div class=”input-group input-group-lg”> <select name=”medio” id=”medio” class=”form-control text-center” required> <option value=”” selected>Forma de Pago</option> <option value=”tc”>Tarjeta de Crédito</option> <option value=”cash”>Efectivo</option> <option value=”cheq”>Cheque</option> </select> <span class=”input-group-btn”> […]

Why do I get an error of undefined function in chrome?

If url is a homepage (i.e index.html), some css properties will be applied to some of its elements. The following script runs fine in Mozilla Firefox but gives an error in Chrome saying the function contains is undefined. Why is that ? Is it that, Chrome doesn’t treat the variable URL as a string ? […]

event.preventDefault() working in Chrome, but not in Firefox / IE

I know there are already a lot of questions on this subject, but I’ve read a lot of them and still couldn’t get my script to work … I have a very basic slideshow which can be seen here : www.screations.net/wm (there are 3 slideshows, I have the same problem on all 3 of them) […]

firefox extension: intercepting url it is requesting and blocking conditionally

in firefox extension I want to intercept the url browser is making request to and block the request entirely if some condition matches how can I intercept URL being requested

FileReader onload only works the second time around in Firefox?

I’m working on in-browser image processing with HTML5 and have a weird issue in Firefox with the onload event handler for the File API FileReader class (which works properly on chrome): the file is only processed properly the second time it’s selected in the form. Any idea how I can get Firefox to process this […]

How do I pass an HTML element as an argument to a Javascript function?

i have a chat window which has a close button(input type=’image’) and onclick i want to remove the chat window from the parent node and i use this code closeBtn.setAttribute(“onclick”, “return closeContainer(cc” + friendId + “);”); please note that this button is created through javascipt and the cc223423432 (say) will be the id of the […]

Does Firefox support Javascript in XHTML pages?

I need to serve XHTML pages that include Javascript. My problem is that Firefox (3.5.7) seems to ignore the Javascript. For example: <?xml version=”1.0″?> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <title>My Title</title> </head> <body> <script type=”text/javascript”> document.write(“Hello world!”); </script> </body> </html> If I save this as test.html, Firefox displays this correctly. If I save this as test.xml, Firefox […]

Making Fixed floating element scrolling smoothly in Firefox and Chrome

I have a script that uses jQuery and CSS to position something at the top of the page when it scrolls. However, the bar looks like it’s shaking when you scroll and it has been fixed to the top of the browser in Google Chrome and Mozilla Firefox. Why could this be? I hope you […]

Why doesn't the JavaScript work for Firefox/Chrome but for IE?

I’ve written a simple JavaScript to add options to an HTML Select element, the code looks like this: function addOption() { var newOption = document.createElement(‘<option value=”TOYOTA”>’); var elSel = document.getElementById(‘mySelect’); try{ elSel.add(newOption,null); } //Standard catch(ex) {elSel.add(newOption); } //IE Only newOption.innerText = “Toyota”; } I found online tutorial that shows we need to do something like […]