Archive for November, 2004

Redirect to favicon after login with Mozilla problem

For years (literally over 2 years) my company has been dealing with an issue where after loging into the intranet using any Mozilla browser (including Netscape and Firefox), it would direct you to the favicon.ico rather than the home page. We are using a protected Java Servlet on a JBoss server to serve up the intranet pages. If the favicon was not present, it would give a 404 error or would say it had not been defined. I’ve spent hours trying to solve the problem, mostly by trial and error, renaming files, adding link data to the head of the index page and everything else I could think of.

Today, however, I finally found the solution!

The problem does not lie in the index page, but rather in the login page. Mozilla browsers automatically look for the favicon.ico in the root directory if there is no link tag in the head of your document. When you attempt to access any protected page without logging in you are directed to the login page. Mozilla is looking for the favicon on the login page and the favicon is protected so it theoretically redirects you again to the login page so that you can access the favicon for the login page. Hence when you log in, you do access the favicon and not the page you were looking for in the first place.

To combat this problem, you need to set up an unprotected directory where the favicon resides and place the following code on your login page:

<link rel="icon" href="unprotected/favicon.ico" type="image/ico">
<link rel="shortcut icon" href="/unprotected/favicon.ico">

This tells the browser to look for the favicon in a location other than the default root directory. Problem solved!

8 Responses  |  add yours »

Flash Plugin Switcher

Today I was attempting to test my flash detection scripts, so I wanted to install a different, older version of the Flash player plugin in my browser. I went out to Macromedia’s website, where they have a page full of Archived Macromedia Flash Players available for testing purposes.

While this page seemed like the answer at the time, once I started trying to uninstall the current version (well documented on macromedia.com) and install the old version (poorly documented on macromedia.com) I was having all kinds of problems. So I googled “flash install cab” and found the app of my dreams!!

Flash Plugin Switcher is a program that lets you switch flash player plugin versions on the fly with the click of a single button! It still requires that you download the .cab files from macromedia (see the link above) but once you have them it’s a breeze. The download page for Flash Plugin Switcher is in German, but the help content is in English.

2 Responses  |  add yours »

DataGrid Component V2 Header Gradient

Ever tried to remove the gradient from the DataGrid Component in Flash MX 2004? I know I sure did! Supposedly you can just change some movie clip in the standardTheme.fla and add it to your movie or something but after following all of the tutorials out there (none of which talked about DataGrid), nothing was working for me. I even tried going through the forums and saw that others were looking for a solution, but to no avail.

Well, after a few days of searching and trail and error processes, I finally came up with an answer!

Instead of dragging the data grid from the components window, open the standardTheme.fla and add it from there. If you just drag the dataGrid component, it will add everything else you need automatically. Remember: this hack won’t work if you just add the compiled clip from the components window. Now you just have to mess with the dataGrid.as found in the following directory:

windows
C:Documents and Settings<username>Local SettingsApplication DataMacromediaFlash MX 2004enConfigurationClassesmxcontrolsdataGrid.as

OS X
Hard Drive/Users/<username>/Library/Application Support/Macromedia/Flash MX 2004/en/Configuration/Classes/mx/controls/dataGrid.as

Once you are in that file, look for a function called drawHeaderBG() and change the following:

from:
var colors : Array = [clr, clr, 0xffffff];

to:
var colors : Array = [clr, clr, clr];

Now you can set the color using mygrid.setStyle(“headerColor”, <yourcolor>); and it will be a solid color!

10 Responses  |  add yours »

Search