JQgrid not sizing properly in IE8 - javascript

For some reason I cannot seem to get IE8 to display my jqgrid right as you can see below. This isn't the only grid that doesn't display properly. I have another one in my project that renders just like the one below :(. Needless to say, I tried all sort of column widths, tried turning the scrollbars off etc etc. but nothing seems to improve the situation.
Am I missing something obvious ?
I am using the very latest JQgrid version 3.8.
Firefox:
Explorer:

Mostly the problem exist in CSS which you use (for example standard CSS generated by ASP.MVC MVC). Different web browsers interpret CSS inheritance differently. Look at this answer and this. Probably the usage of increased cellLayout parameter or the function fixGridWidth inside of loadComplete could solve your problem.

Related

Hierarchical layout with vis.js

I'm using vis.js library to graphically display a network. I read the documentation and I need to use the hierarchical layout. It works fine until I use the sortMethod='directed' option. In this case I end up with a blank page. There's no Javascript error. Every other options combination works fine, but I need the directed option. I followed the documentation and it doesn't seem that I need to add further information to the network: it should all work with the 'from' and 'to' edges properties. What could it be?
Thank you all.
It seems to be a bug. I have been using this feature for months and suddenly it stopped working. I get the same behaviour as the one you describe. All options seem to work except the sortMethod='directed'. I cannot tell for sure which version introduced this bug but I found it out at 4.12.0.
We probably need to raise an issue to let their dev team know about it.
Hope that helps. It is not exactly a solution to your issue but rather a verification of this bug since I have the same issue.
EDIT:
I tried both 4.11.0 and 4.10.0
4.11.0 : I get the same buggy behaviour.
4.10.0 : Works as expected. No issues.

FontAwesome + IE7 + Dynamic Loading Content = Pain

I'm trying to use FontAwesome for some control icons on a jQuery lightbox plugin I've developed. For the life of me, and I can't get the icons to display in IE7. I followed the advised here to reload the IE7 stylesheet after the lightbox opens. However, where the icons should be, I just see their UTF numbers (e.g. 0xf024;). It's almost as if the output has been "escaped" somehow. Any help or ideas would be greatly appreciated.
Update:
I just discovered that this isn't just happening on dynamically loaded content. I'm seeing the same thing on any icon just loaded in the HTML.
Update 2:
I think the problem may be related to subsetting. I was using a subset of font-awesome, and when I tried just loading the complete package it worked. Now, I have to see what the difference is between the subset and the full package that's breaking it.
As indicated in the update above, the problem was with the subsetting of the font. The customized IE7 stylesheet for the subset had a few bugs. The problem came from the characters being referenced like this 0xf023; instead of like this . Once I made that correction, everything worked as expected.

Micro Javascript templates not rendering correct in IE, but works fine without javascript?

This is a bit of an odd issue I'm having. I've been using John Resig' micro-templates for a meeting minutes application, and it seemed to work well, but lately I've been having an issue.
Basically the application fetches some JSON from an ajax call, and then uses the templating engine to generate a table with various actions like so:
This works fine, its a little slow in IE (javascript rendering) but it works. However randomly I'll get a stuff up in the display:
notice the gap there, its pushed it out wide, also, its made the rest of the rows squish up. I've tried every CSS/HTML trick I can think of to try and get IE to render it properly, but I'm out of ideas (any suggestions would be great!) . I'm using JQuery Sortable so you can drag each of those rows around, I noticed that when you drag it and place it again, it displays correctly. It's as if it thinks theres an extra TD there, when there isn't.
So I opened the IE developer tools and copied the inner HTML of the HTML element. Pasted this into a HTML file and put it on the server, turned off the JS so it wouldn't reload the elements and ran the page. It displays perfectly, just as in my first image.
So I'm confused as to why IE will render the page fine if the HTML is present from the start, but the templating engine causes odd stuff ups.
I'll probably look at rendering that part of the HTML on the server, and only use the templating where I need to. But has anyone come across this sort of issue before? is there any trick I can do to make it render it as it should?
we had similar problem in our company and our designer solved it. Solution was in concatenating tags one after another without spaces and/or without new line. Code is not looking great after that but still solves problem.
Thanks,
Nikola

How viable is ie7-js by Dean Edwards?

I just found out about ie7-js ;
IE7 is a JavaScript library to make
Microsoft Internet Explorer behave
like a standards-compliant browser. It
fixes many HTML and CSS issues and
makes transparent PNG work correctly
under IE5 and IE6.
http://code.google.com/p/ie7-js/
It looks like it's really good, but is it really working (the current issue list looks quite scary)? Have you already worked using this with success?
Another question is how slow the script will make the website in IE ?
In static pages it works pretty well. If you designed a couple of static html pages using modern browsers and standards and want it to be shown correctly in IE6 and 7 this script is gonna help you.
But, and it's a big but, if you add a little javascript to the recipe, this method shows its weaknesses. Anything added later to them DOM or any event triggered afterwards will NOT be affected by this script.
That's it. my one line recommendation is if you have simple and light pages use it. otherwise try solve your problems by looking at the roots!
I think the best answer is: try it on your website and see if it works for your particular code. If it works, and doesn't impact the speed, great, you're done. If it doesn't work, then you're going to have to spend the time to make your site work in IE.

iframe shimming or ie6 (and below) select z-index bug

Uhm I'm not sure if anyone has encountered this problem
a brief description is on IE6 any <select> objects get displayed over any other item, even div's... meaning if you have a fancy javascript effect that displays a div that's supposed to be on top of everything (e.g: lightbox, multibox etc..) onclick of a certain element and that div overlaps a <select> your div get's to be displayed as if it's under the <select> [on this case a max and minimum z-index doesn't work ]
I've tried googling and found the iframe shim solution
but I wanted some pretty clean alternatives
or better yet has anyone found a better solution?
since the method using iframes uses around 130mb of ram might slow down poor people's machines
You don't have to hide every select using a loop. All you need is a CSS rule like:
* html .hideSelects select { visibility: hidden; }
And the following JavaScript:
//hide:
document.body.className +=' hideSelects'
//show:
document.body.className = document.body.className.replace(' hideSelects', '');
(Or, you can use your favourite addClass / removeClass implementation).
There is a plugin for jquery called bgiframe that makes the iframe method quite easy to implement.
Personally, as a web developer, I'm to the point where I no longer care about the user experience in IE6. I'll make it render as close to "correct" as possible, and make sure it's functional, but as far as speed goes, too bad. They can upgrade. IE7 (though still quite slow, compared to every other browser) has been out for 2 years (almost to the day!). IE8 is going to be out shortly. Firefox is available for every platform. Safari is also an option (and super fast). Opera is available for most/every platform.
IE6 was released in over 7 years ago. IMHO, there is no reason to still be using it, other than lazy users and incompetent IT departments (or if you're a web developer).
in case anyone is interested, here's some IE shimming code.
* html .shimmed {
_azimuth: expression(
this.shimmed = this.shimmed || 'shimmed:'+this.insertAdjacentHTML('beforeBegin','<iframe style="filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);position:absolute;top:0px;left:0px;width:100%;height:100%" frameBorder=0 scrolling=no src="javascript:false;document.write('+"''"+');"></iframe>'),
'inherit');
}
ref: this gist by subtleGradient and this post by Zach Leatherman
Prior to IE7 the drop down list was a "windowed" control meaning that it was rendered as a control directly by Windows rather than the browser synthesizing it. As such, it wasn't possible for it to support z-indexing against other synthesized controls.
In order to appear over a DDL, you must use another windowed control, like IFRAME. You can also use a little known IE-only feature called window.createPopup() which essentially makes a chromeless popup. It has limitations, like unstoppable click-out, but they are actually kinda helpful if you are building a hover menu system.
The simplest and most elegant solution to that annoying IE bug is found at: http://docs.jquery.com/Plugins/bgiframe using jQuery.
I reached that conclusion after trying for 2 days to make it work with WebSphere Portal / Portal Applications where everything is dynamic, including the fly-over menu.
There's also the activex method, which I'm starting to explore. It requires creating conditional code to use an activex control instead of a select box for ie6. There's a demo script showing the technique, which is discussed in more detail here.
Update: it appears that MS Office is required for the active-x control to be on the user's machine. In theory, it might be possible to include that somewhere, somehow, but that's getting a lot messier.
I know many people suggested their own tips, but in my case, I just simply hide select using jquery like the below.
$(':date').dateinput({
format: 'dd/mm/yyyy',
onBeforeShow: function(event) {
$('select').hide();
},
onHide: function(event) {
$('select').show();
}
});

Categories