Tweaking User Group Map Stuff

Just wanted to drop a quick post to let folks know that I'm in the process of tweaking my user group map scripts to make sure they work properly with Firefox 3. I think I've got it working, but still need to make sure I didn't break anything else, including Firefox 2. So if you see the occasional script error, or javascript alert dialog, that's what's going on.

It looks like the issue is a change in the type Firefox reports for a certain element that I'm testing for a fix that I used to get the maps working in FF 2. The statement:

if(typeof(Element) == 'function'

returned true in Firefox 2.x, but in Firefox 3.x the return value from the typeof call is 'object' rather than 'function' (IE returns 'object' too, so at least this means they're now consistent. So I did a little searching on Live Search, and found the following solution from Dean Edwards, which tests for support for conditional compilation to determine if the current browser is IE:

var isMSIE = /*@cc_on!@*/false;

Then I just test the value of isMSIE, and either apply the fix or not, depending on the value.

For more information on conditional compilation in IE, see this tutorial on javascriptkit.com.

If you're using Firefox 2, Firefox 3, IE 6, or IE 7, and you encounter problems with the rendering or function of the user group map (missing pushpins, etc.), please let me know.