Updated rMenu

Ruthsarian Menus has been updated with my fix for the IE7 bug where menu items that have no sub-menu do not correctly enter the hover state when the mouse enters the LI element but not over the text.

I simply added a new selector ul.rMenu-ver > li and copy the rules used for the IE 6 hack rather than just pull the * html hack this new rule mimics. Why? Personal preference, I guess. This rule, with the use of the (immediate) child selector (gt;), just feels less ambiguous in how the inheritance works.

Gargoyles #5 should hit the stands tomorrow. Although because it’s not yet world renowned (but it will be!) you might have to ask your local comic dealer to order a copy or you can order a copy online. It probably won’t show up on the SLG (the publisher’s) web site until later this week when it’s officially out (they’re a bit slow sometimes).

This is the issue of issues to see. It’s a dramatic climax to the current story arc and it’s easily the most beautifully drawn and colored of the books so far. So if you’re going to give the book any chance at all now is the time.

ColdFusion Bit

I’m writing a script that talks to a third-party via an HTTP POST operation to retrieve a special token. The raw POST data is first hashed through an HMAC version of SHA-256 and the result included with the POST data.

To do this I sent all my data through URLEncodedFormat() first to create my own copy of what the raw POST data should look like, then I hashed the result. The problem is ColdFusion’s URL encoding scheme differs from the third-party. They use JAVA’s URLEncoder.

So a little tinkering and I find I can simply create a URLEncoder object, encode my strings, hash, and be on my merry way. Except I was still getting errors even though the hash was now correct when compared against a supplied PERL script using the same data.

I was now thinking that CFHTTP itself was the problem, that it wasn’t encoding the data exactly as the third party wanted. Well now what? Well I spend a few hours trying to figure out how to play with many various JAVA objects to, eventually, mimic an HTTP POST operation and allow me to control how the POST data is encoded.

After a bit of trial and error it worked against a test script that just dumped form data so I can debug things. So I redirect it to the third party and it fails.

Long story short, I finally find that it’s not CFHTTP that’s the problem, but the third-party’s POST data variable names are case sensitive. So is the hash.

So this bit of work I did trying to mimic a POST operation is all for naught. So I now throw it out here in case someone might find it even slightly useful. NOTE: it’s not production quality as I was just hacking around and I’m sure there are easier ways or more proper ways to do this as I rarely do any development in straight JAVA (and I’m not consistent in my scoping because I got lazy), but.. here you go:

URLObject = CreateObject( "JAVA", "java.net.URL" );
URLObject.init( arguments.site_url );

URLConnection = URLObject.openConnection();
URLConnection.setDoInput( TRUE );
URLConnection.setDoOutput( TRUE );
URLConnection.setUseCaches( FALSE );
URLConnection.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded" );

DataOutputStream = CreateObject( "JAVA", "java.io.DataOutputStream" );
DataOutputStream.init( URLConnection.getOutputStream() );
DataOutputStream.writeBytes( arguments.buffer );

InputStreamReader = CreateObject( "JAVA", "java.io.InputStreamReader" );
InputStreamReader.init( URLConnection.getInputStream() );

BufferedReader = CreateObject( "JAVA", "java.io.BufferedReader" );
BufferedReader.init ( InputStreamReader );

local.content = "";
local.buffer = BufferedReader.readLine();
if ( IsDefined( "local.buffer" ))
local.content = local.content & local.buffer & Chr(13) & Chr(10);
while ( IsDefined( "local.buffer" ) );


The real interesting piece here is that if you set a variable to the return value of a JAVA method and said method returns a NULL value the variable is deleted. So that’s why I’m using IsDefined.

Bits n Pieces

Working on a fix for the bug pointed out by Al in the previous post’s comments. IE 7 won’t properly detect a mouse is over a list item element unless there’s a sub-menu. The short fix is to find the following CSS on lines 485-486 of rMenu.css:

* html ul.rMenu-ver li,
* html ul.rMenu-hor li ul.rMenu-ver li

and remove the star-hack so it looks like:

ul.rMenu-ver li,
ul.rMenu-hor li ul.rMenu-ver li

You’ll note in the comments for this set of rules that I say floating the LIs breaks IE7. But now it doesn’t. This has me worried. I need to do more testing. I also found some demo pages without this fix work just as expected. It seems shifting the left-column left with negative margins breaks IE7’s ability to correctly detect hover states (for whatever reason) on LIs. After I play around a bit more I’ll decide what the real fix is.

The name “Ruthsarian” is just a made up word I used to name this little piece of the web that I own. I wanted it to be a word that didn’t exist before I used it. I think I’d seen something with dinosaurs in it the night before and the “saur” might have seeded the syllables that just appeared in my head.

Gargoyles comic issue #5 should be out the last week of July. I believe it’s just waiting on final approval from Disney before it heads to the printer. The issue will be the last in a 3-issue story arc. The issue will feature a guest artist and colorer and will certainly be the best looking comic produced in the series so far. (I’ve been given a sneak peek. It really is amazingly good.) Also a couple big mysteries get revealed and some new plot points introduced that should leave fans going nuts with anticipation for the next issue.

If I were to try and introduce the comic to anyone this is the issue I would give you. You should be able to order it online at SLGComic.com when it’s released, or you can contact you local comic shop.