Posts Tagged ‘Firefox’

Font rendering weirdness with @font-face

Monday, August 23rd, 2010
I’m getting poor quality rendering in Safari 5 and Firefox 3 (possibly others as well, though this is what I’ve tested).

I’m using a few fonts from FontSquirrel via their generator. Usually, when the page loads, everything looks fine, but when scrolling around even a little bit, some fonts will redraw poorly. I’ve attached two screencaps of the font, rendering correctly, and then of the font rendering poorly.

These were fonts available on FontSquirrel, so it shouldn’t be a corrupted source file or anything. Google didn’t yield anything about issues here.

Are there any know issues with using @font-face with more than one font on a page? Any theories?

If you’d like to see this on the live site, look here in the sidebar.

Download plugins by javascript on Chrome, Safari

Monday, August 23rd, 2010

Dear all,

I have implemented the plugin by NPAPI for Firefox, Chrome, Safari, but there is a issue for me is how to download the plugin by javascirpt on chrome, Safari?

I know the .xpi is a extension for Firefox, and I can write the script for downloading the xpi from server and Firefox will equip a xpi to Firefox extension folder.

But how can Chrome and Safari do for downloading the plugin ? As I know the Chrome should put its plugin dll on C:UsersUserNameAppDataLocalGoogleChromeApplicationplugins folder, Safari should put its C:Program FilesSafariPlugins ?

I’m appreciated for any infomation. Thanks

jQuery UI slider doesn’t work in Safari, Chrome or IE8

Sunday, August 22nd, 2010

I received this handy answer to my question Is there a way to make the jQuery UI slider start with 0 on top instead of on bottom?

It worked great, however, in IE8, it always shows the slider pointer (better word?) at the bottom, and it is unmovable.

I followed the example from this code on JSfiddle provided by Nick Craver. The example works fine in IE8.

Because I set the options dynamically, I’ll display what should be their values.

var slideMax = $thumbs.innerHeight() - $thumbs.parent().outerHeight();

$(this).slider({
  min: 0,
  max: slideMax,
  value: slideMax,
  stop: function (event, ui) {
      $thumbs.animate({ top: (slideMax - ui.value) * -1}, 500);
  },
  slide: function (event, ui) {
      $thumbs.css({ top: (slideMax - ui.value) * -1 });
  },
  orientation: 'vertical',
  range: 'max'
});

The page in question is here. The JavaScript file is here. It works fine in Firefox.

If you need any more information, please ask.

Thanks again everyone.

Update

I realised I didn’t understand how jQuery UI worked – I thought there was a base library for it, of which the widgets extended. I was including jQuery UI twice. I’ve since fixed this, but the error remains.

Update

As you can see, now offering 200 rep and many thank you‘s to someone that can help me out here!

The weirdest thing, is when I access the site using IE8 on my localhost, the slider works. Online, it doesn’t. The 2 sliders have different images though, so I’m going to make them the same and see if it still happens.

Update

By explicitly giving the items a height via CSS, it has seemed to work!

what is the default action happening when we drag over an image ?

Saturday, August 21st, 2010

Hello

What is the default action happening when we drag over an image ?

When I drag over an image the cursor changes to a black circle with a line inside (in Firefox) I could block it by the code e.preventDefault() using jquery, but I didn’t understand what is the default action happening when I drag over an image.

Thanks

doctype and animation problem

Saturday, August 21st, 2010
Hello I am new to javascript. I have knowledge of Actionscript.

I am facing a problem regarding doctype.

I made a simple animation using javascript but it is not showing on firefox when using doctype,( IE, opera works).

Without doctype it works perfectly on 3of them.

Please help me..

my code goes below.

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <script language="javascript" type="text/javascript" src="src/JSTweener.js"></script>
    <script language="javascript" type="text/javascript">
        var total = 6;
        var counter=0;
        var pos;
        var imgwidth=950;

        function move1() {
                  counter = counter+1;
                if(counter<total){
               
                pos = 0-(950*counter);
                }else{
               
               
                }
                JSTweener.addTween(container.style, {
            time: 1,
            transition: "easeInOutQuad",
            onComplete: move2,
            left:pos
        });
      }
         
          function move2(){
          alert(container.style.left);
                  if(counter==total-1){
                        counter =0;
                        container.style.left=0+'px';
                       
                }
          }
          </script>
<style type="text/css">
#main{
position:absolute;
overflow:hidden;
width:950px;
height:300px;

}
#container{
       
        position:absolute;
        float:left;
        width:5px;
        left:0px;
       
}
.myclass{
        float:left;
        z-index:0;
        }
</style>
       
</head>

<body>
<div id="main">
<div id="container" onClick="javascript:start()">
        <div class="myclass"><img src="images/plate1.jpg"></div>
        <div class="myclass"><img src="images/plate2.jpg"></div>
        <div class="myclass"><img src="images/plate3.jpg"></div>
        <div class="myclass"><img src="images/plate4.jpg"></div>
        <div class="myclass"><img src="images/plate5.jpg"></div>
        <div class="myclass"><img src="images/plate1.jpg"></div>
</div>
</div>
<script language="javascript" type="text/javascript">
function start(){
 var container = document.getElementById('container');
        container.style.width=imgwidth*total+'px';
 move1();
 }
</script>
</body>
</html>


Trigger resize event on print

Saturday, August 21st, 2010

I have a div in which I create a chart using protovis. The div has width: 100% and height: 100% and the code to create the chart uses $('#chart').width() and $('#chart').height() to get the size of the div at render time and fill the page with the chart. I capture the resize event on the window and adjust the div and the chart so that it resizes when the window resizes.

Now I need to print. I would have hoped that when the browser is rendering the page for the printer it issues a resize but it doesn’t, at least Safari and Firefox don’t. Chrome does something strange in which it resizes only the height but not the width. Is there a way to trigger this behavior just before print?

Do XUL applications work only on Firefox

Saturday, August 21st, 2010

I’ve seen an XUL-based application recently that supposedly works on the desktop. Isn’t XUL the Firefox language? I thought it wouldn’t work on anything other that Firefox and certainly wouldn’t work as a desktop application.

Can someone who knows more about XUL confirm its compatibility with other browsers (IE, Chrome, etc.) and if it runs as a desktop application, its compatibility with operating systems (Windows, Mac, Linux)

Border-Collapse Problem on Multiple Browsers

Saturday, August 21st, 2010
Hi everyone,

I’m seeing a problem with borders in a table when using the border-collapse:collapse rule and I’m not sure if it’s my CSS or the browsers that are causing the problem.

Since there is a wide variation of rendering across browsers I am guessing it’s a wide-spread browser problem (but that seems unlikely).

The only browser that seems to render it correctly is Firefox. I don’t know if Firefox is actually rendering it correctly but its rendering is what I was hoping to see in all browsers.

As an aside, IE 8 will render the same as Firefox but only if I put IE 8 in "compatibility mode". The screenshot for IE 8 is not in compatibility mode.

The link below is to an HTML5 page containing a live version of the table along with screenshots from all the browsers I tested with. of course, if you want to see the HTML and CSS just do a "View Source" on the page.

If anyone can explain what the expected CSS behavior is and why, and which browser renders correctly, if any, I would appreciate it.

Thank you very, very much.

http://www.csharpies.net/qr309/bingo.html

How do you “view source” for the “description” in an ebay page?

Friday, August 20th, 2010

I am attempting to see how other ebay users construct their descriptions, and as far as I can tell, the description part of the listing page does not show up in the “view source” of any listing page.

So, I figured it was loaded with javascript and used the “view generated source” of the Developer Toolbar addon for FireFox, and still no dice!

Crazy! How I am not seeing the page source for the listing descriptions?

how to properly rewrite this code

Friday, August 20th, 2010
I have a jquery slider that is not cross browser compatible. It works in all browsers except FireFox. From reading other forums it says that FireFox needs to read document.getElementByID to properly read the javascritp.

Does anyone know a way I can rewrite this code to still make the slider work but make it function in all browsers?

<script type="text/jscript">
        $(document).ready(function(){
                $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
        });
</script>

View page here: http://www.flyteusa.com/flyteusa/index1.php