Archive for April, 2006

Just as good as a homerun in the world series…

Thursday, April 27th, 2006

…or a touchdown at the super-bowl.

Well, maybe not. But that’s how it feels when you figure out a chunk of code you’ve been trying to master for 2 months.

I almost yelled “YYYYYEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEESSSSSSSSSSSSS!!!!!!!!” in the middle of my office.

If you ever visit my (poorly organized) website, you’ll know that I am working on a firefox extension. The “Status-Bar Calculator”. The thing I’ve been stuck on for two months is how to make something move to a certain location on the status bar upon the browser loading.

The logic is simple (now that I know it) and I’ll outline it on my site soon, but basically it goes like this:

in your .js file add an event listener to listen for a “load” event that fires a function when detected. (basically, when the browser or a new window starts up, run such and such function)

In the function, get the calculator, and remove it from the status-bar (since it gets added at a default location when the browser starts up, you have to remove it to move it) using the “remove child” attribute/function/thing from the status-bar.

Then ADD it at whatever location is specified in the user preferences (using the appendChild function/attribute/thing of the status-bar).

The code is as follows:

function events() { var sbar = document.getElementById("status-bar"); var sbarPanel = document.getElementById("my-panel234");

 sbar.removeChild(sbarPanel);

 var pos = 1;//this is where you would grab the preference and apply it to pos     sbar.insertBefore(sbarPanel, sbar.childNodes[pos]);}

window.addEventListener("load", function(e) { events(); alert("events fired");}, false);

WHY ISN’T THIS IN THE DOCUMENTATION, OR ANYWHERE ON THE WEB????? Maybe it’s just too common sense to everyone else in the world, and nobody thought anybody would have to be TOLD how to do it… Maybe I’m just that dumb. Oh, well. It’s here now, and soon on my site… And I guess the documentation is a wiki, so I can put it there too if I feel like it…

Finished Book 1

Tuesday, April 25th, 2006

Yep. Done. Finito.

Now I just have 833 pages to go in book 2, and about 500 in book 3, of the books that I have to learn to be up to par in Java, JSP, and JSF…

Yay.

14 Days Later…

Tuesday, April 18th, 2006

So… Did I do it? Could I finish those 1,150 (or howevermanyitwas) pages by friday? HAH!!!! Looking back now, it’s laughable that I was so naive…

I’m just now finished with 579 of them (almost done with the first book).

I have learned alot of other things though. I’ve learned Ant scripting and Shell Scripting. Learned alot about batch files. Also doing fairly well with Linux.

Despite having not finished the books yet, I’ve made several changes to the live websites successfully.

So, once I ‘know’ Java and JSP (ie. finish the books) I’ll be doing great. I think it’s gonna work out.

Oh yeah, and then I have to start learning AJAX…

A job…

Tuesday, April 4th, 2006

Yep. Got one.

Java programmer.

Don’t know much java yet.

Have till friday to read 1,150 pages (total) in 2 java books in order to learn what I need to know by the time I have to take over for the programmer who is leaving. I got the job last monday, and so far have done a total of 350 pages… starting to feel the pressure…