Monday, May 17, 2004

Ran into a small problem when I tried to run our webapp in Tomcat 5. I got this error, "can't declare any more prefixes in this context" along with a stack trace. As far as I can tell, this is caused by conflicting XML parser versions. In our case, we had a ReportMill6.jar in WEB-INF/lib that contained a copy of the Crimson parser. That was enough to cause this bizarre error to appear when I tried to view a JSP. Fixing it meant deleting the jar.

Tuesday, May 11, 2004

I just ran into a small problem with our site layout where one of the boxes would mess up the whole layout if its content was too long (it's a tree control with the text set to not wrap). I figured the solution would be the CSS property, overflow. In compliant browsers, when this is applied to a DIV and set to auto, scrollbars will appear if the contents of the div would overflow the box. The problem is, IE doesn't properly handle the overflow property for divs. However, IE does have a non-standard extension, overflow-x and overflow-y. So the solution to my problem was to give the div the following style:

<div style="width: 100%; overflow: auto; overflow-x: auto; overflow-y: hidden;" >

The first overflow style is for compliant browsers. The overflow-x causes the scrollbar to appear if necessary. The overflow-y disallows vertical scrollbars.

Monday, May 10, 2004

Today I used a new tool for the first time. It's a DOM viewer for IE (it may be for other browsers as well, but Moz has one builtin, so who cares). It's from Brain Jar. You add a link to their domviewer.html page from the page you want to inspect and it brings up all the properties for the top-level object. Clicking on an object with children expands to show the children. It doesn't work perfectly (E.g. I wasn't able to drill down to a specific IFRAME), but it was able to help me find the property I was looking for.

Friday, May 07, 2004

Lately, I've been wrestling with CSS to make our site more compliant and standards driven. With IE 5.5+ being our target browser, this becomes very interesting. IE is more standards compliant than I would have initially expected, but it's still not even close to Moz which is frustrating. Complicating matters is the lack of good tools. In Moz, I have various bookmarklets that can tell you the styles applied to an object in the page or even open a javascript "shell" you can use to interactively query your page. Most of the bookmarklets don't function in IE, so I have to try to keep my page working in Moz as well, just to be able to use the tools, and while I'm in favor of Moz compatibility, I have no such mandate from management to spend my time that way.