Gif Won't show in firefox, works on chrome and IE
Hello!
i have a script to create an image after certain event on the client side of a web server we have.
var div = document.getElementById('div1'); var src = 'cargando.gif' var img = new Image(); img.onload = function () { img.align = 'center'; img.width = 400; img.height = 400; img.alt = 'Cargando..' div.appendChild(img); }; img.onerror = function() { alert('no image'); };
img.src = src;
Pretty simple, but, upon uploading it to the final server, it won't work on firefox, it was driving me mad, and changed the code multiple times, untl i tried on chrme and it worked perfectly. Any suggesions?, it doesn't work on firefox 54 on MAC , and the lastest version on windows.
ps. The end-client is on windows , so i realy don't care for the MAC plataform.
Ps2. it doesn't even show the alt message "Cargando". just a blank space.
Ændret af Quackpower den
Alle svar (1)
Hello,
Try Firefox Safe Mode to see if the problem goes away. Firefox Safe Mode is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
- Click the menu button , click Help and select Restart with Add-ons Disabled.
If Firefox is not running, you can start Firefox in Safe Mode as follows:
- On Windows: Hold the Shift key when you open the Firefox desktop or Start menu shortcut.
- On Mac: Hold the option key while starting Firefox.
- On Linux: Quit Firefox, go to your Terminal and run firefox -safe-mode
(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
When the Firefox Safe Mode window appears, select "Start in Safe Mode".
If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems article to find the cause.
To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.