Office Windows, Field Trips, and Women
June 19, 2007
[Names changed...]
Kate, the lady in charge of advertising downstairs, was nice enough to give me an opportunity to get out of my closet-of-an-office for a little while and tag along on a business meeting with a web development company. (This is a big treat for a college student who’s not used to being crammed in a stuffy little office all day, and who prefers free-range roaming on campus instead.)
This was my first experience with a business meeting outside our company, so it was really interesting to observe how things went down, the process, the etiquette (although I admit that the atmosphere during the meeting was considerably lighter than the atmosphere at work..), etc. It also convinced me that maybe I should take a few business classes or try and attend a few more business meetings to get a hang of this smooth business-talking style, because I, like so many other pseudo-programmers/programmers/nerds, am not adept at speaking formally..
Anyway, the building was absolutely gorgeous..(though any building with lots of open space inside might seem considerably more attractive when you’re used to a closet). Kate agreed with me, and we just awed..
“Whoa, you guys have windows…huge windows..”
What is it about lots of office buildings not having windows anyway? Is it because it’s distracting? Easier to work when you lose track of time and get into the “zone”?
Anyway, Kate told me that she didn’t notice any women on the company’s list of employees, and sure enough, I didn’t see any when we were given a tour around the office. There aren’t too many women where I work either–just the secretaries, Kate, and two other women. You’d think I’d be used to this by now after having taken computer science classes for 2-3 years (I’m counting high school too), but it still made me a little sad to see it in the real world.
Lately, I’ve been talking to some people about potential projects after I’m finished with this navigation bar (and boy, am I looking forward to that), including some Flash animation, actual website building (not just web-based applications), and Java programming, and I’m getting really excited to work on new stuff. Just this cursed navigation bar in the way… (never again, never again!!)
Dreamweaver Menus…A Solution, and Then Some
June 17, 2007
Tech-y post written for all the unfortunates who have suffered or are still suffering from the same problem I had….
Recently, I started working on part of a web-based application for a company over the summer, and me being:
1) A very visual person
2) Horribly inexperienced with Javascript, HTML, DOM, and the like..
I began using Dreamweaver (first 8, and then CS3) to help me create a series of dropdown menus, with an applet directly underneath the navigation bar. Almost immediately, I ran into the problem of my dropdown menus appearing behind the applet instead of in front. I scoured the web for many days, searching for a solution, and mostly what I found were suggestions to rearrange the page so that the menus simply wouldn’t drop down in front of something (an answer I found to be particularly frustrating), unanswered pleas for help often accompanied by insane and intimidating code posts (Dreamweaver’s drop-down menus come with a nasty-looking javascript file), or criticisms of Dreamweaver’s drop-down menus (and rightly so), with suggestions to go find a free one or follow some tutorials. I also fell upon Andy Finnell’s criticism of the menus, and you know it’s pretty bad when even the guy who had a part in developing part of the menus tells you not to use them.
Anyway. But let’s say that for some reason or another, you’re absolutely determined to use Dreamweaver’s menus–maybe you don’t care about the javascript file size or the code’s inefficiency–you just want some damn drop-down menus.
There’s a solution posted here, but the solution is only for Internet Explorer. (Many thanks to SDozono anyway!) Turns out the trick was to put an iframe (apparently they call this an iframe shim technique?) behind the menu, to force the menu to appear over things. Pretty spiffy. To have it working for Firefox, a few additions and changes have to be made:
In the checkIE() function, you can either change it so that it returns true for when Firefox is the browser in question, or just get rid of this function entirely (and deleting any calls to it in other parts of the code). To change it so that it returns true for Firefox:
function checkIE()
{
var BrowserName = navigator.userAgent;
if (BrowserName.indexOf("MSIE") > -1)
{
return true;
}
else if (BrowserName.indexOf("Firefox") > -1)
{
return true;
}
else
{
return false;
}
}
This is because SDozono’s shim-related methods run a check to make sure the browser is IE, or it won’t execute. Next thing to change is the writeShim() function:
...
if (BrowserName.indexOf("MSIE") > -1)
{
var shim = document.createElement ("<iframe id='"+shim_name+"' scrolling='no' frameborder='0'"+
"style='position:absolute;top:"+shim_top+"px;"+
"left:"+shim_left+"px;z-index:5;' width="+shim_width+" height="+shim_height+"></iframe>");
}
...
It turns out that IE and Firefox handle some DOM elements differently–or in other words, Firefox won’t allow you to pass in bits of HTML in DOM’s createElement() function, but for some reason, IE will. So underneath that if statement, try adding in:
else {
var shim = document.createElement('iframe');
shim.setAttribute("id",shim_name);
shim.setAttribute("scrolling","no");
shim.setAttribute("frameborder","0");
shim.setAttribute("style","z-index:5;position:absolute;width:"+shim_width+"px;
height:"+shim_height+"px;top:"+shim_top+"px;left:"+shim_left+"px;");
}
And that’s pretty much it. I won’t guarantee that this solution is perfect, so best to save a copy of your original work before trying this one. Hopefully, this will help some frustrated and lost soul out there..