Monday, September 22, 2008

Office Live and Javascript

Today I came across an interesting little tidbit while here at work. I just finished a client's Web site and had posted it onto their server (they are using Windows Office Live...which is important to this story). I also installed swfobject 2.0 and lightbox 2.0 to switch out the navigation menu and create a photo gallery, respectively.

Everything worked great on my test server (which I believe is an apache server). So, I proceeded to upload the files to the Microsoft server (Office Live). I then received and email this morning from the client asking why the photo gallery wasn't working.

I was like, hrhhhh?

So, I checked it out. And sure enough, it didn't work. I tested it on a PC with IE 7/Firefox/Safari(PC) and then on my Mac with Safari. So then I did what I normally do, googled "Lightbox and Office Live". I came across one post that sort of pointed me in the right direction. The moderator basically gave an answer to the effect of, "change the extension names from .js to .jsx, that way the server won't cache the .js files".

So I did that, yet the gallery wasn't working quite correctly. I'd click on an image and it would remove my menu. It turns out there's another step you need to do to get it to work correctly.

Open the scriptaculous.jsx file (you renamed it, remember..if not it'll be scriptaculous.js, but it should be changed) and find the three (3) .js in this section:

$A(document.getElementsByTagName("script")).findAll( function(s) {
return (s.src && s.src.match(/scriptaculous\.jsx(\?.*)?$/))
}).each( function(s) {
var path = s.src.replace(/scriptaculous\.jsx(\?.*)?$/,'');
var includes = s.src.match(/\?.*load=([a-z,]*)/);
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
function(include) { Scriptaculous.require(path+include+'.jsx') });
});
}
}


and change them to jsx (like they are in above) or just copy that and replace it in your file.

And there you have it! Working Lightbox on your Office Live server.

On a related side note: I was also having issues with the menu not loading using the swfobject.js, but it didn't concern me as I had a css menu in place if it didn't load correctly. But I changed that to jsx and viola! it works.

Hopefully this helps somebody out there searching for the same thing.

Friday, September 12, 2008

lying liars and the lies that the tell.

this video is awesome:

Check it.

Also, head over to myspace.com to check an awesome debate between my friend Chris and a fundamental christian.

Check it here

Wednesday, September 10, 2008

You can put Lipstick on an asshole and it's still...

The news media covering this "Pig in lipstick remark" is a bunch of shit. Also, to the Republicans, grow up already. People in your own party have used this remark.
McCain repeated the folksy metaphor when he criticized Sen. Hillary Rodham Clinton on health care. McCain was never accused of being sexist when he uttered those words.


Here's the link to the full story.

In fact, Nightline is running segments right now of Bush, Cheney and Edwards using the phrase.

ASSHOLES

Friday, September 05, 2008

Obama Tax Plan

My friend Chris brought this site to my attention today:

http://alchemytoday.com/obamataxcut

It's awesome. Everyone should check it out.

Also, I watched the McCain speech (to be fair, I would like to hear both sides). The one thing that pissed me off is the "booing" after McCain would mention Obama's name. Apparently American Republican's are a bunch of fucking 3rd Graders.

NOT ONCE, did I hear booing at McCain's name during Obama's speech. For once the democrats have a solid leader. Now, we just need everyone onboard. Yeah, I'm talking to you, Hillary-didn't-win-the-primary-so-I'm-voting-for-McCain asshole.

60 days. 3 debates. It's on.

Tuesday, September 02, 2008

More Rants!

So it's been a while since I've posted...so:

I went to Canada for a little over a week to go fishing with my dad. It was a blast. I didn't realize how much I enjoyed fishing, although, I have to admit I was kind of a sissy about putting leeches on the hook. What can I say? They won't kill me, but damn are they weird little creatures. Little mini vampires.

I'll post some pics when as soon as I can.

Next:

Did Whirllyball. That was fun too. Megan and I went to a birthday party for Meg (Reptoids) and her girlfriend Michelle. We're all old now. Logan's Run style. I injured myself good doing it. Whirlyball is basically basketball + la crosse + bumper cars. I rammed the wall a few times, as well as opponents. I think I have internal bleeding.

Finally:

So, I was watching ABC's coverage of the Republican Convention and they were showing some of the parties/soirees that our elected officials were attending. Basically a bunch of lobbyists and industry insiders get together, party it up with our government, and then give money based on promises (OK, you all know what lobbying is). However, this is the part that pissed me off:

As the camera people would film these individuals, they would duck out of sight, go into "closed" door areas or just tell them off. Why does this piss me off? Because as an elected individual to our government — you have a responsibility to the public (for which you represent) to show your face, have better judgement and be accountable for your actions. You aren't some rock star — you make policy decisions for our nation. Oh, and the man you chose to run for Commander-in-Chief (McCain) asked that the festivities be toned down in the wake of Gustav. Nice work.

If you are embarrassed about where you are or what your actions are — you shouldn't be doing them. I'm talking about politicians still, most of the general public has my blessing to be bat-shit-crazy.

Anyway..silly rant, but damn did it make me mad. I'm sure Democrats have the same, but it just happened I caught the report on the Republicans.

Final words: Sarah Palin should continue the advocation of abstinence-based sex education. It works like a charm. I think I read some where that an individual thought sex education in high school was inappropriate and gross. I'll have to find that. Gross is awesome. That's what they should teach kids, "Don't have sex, cause it's gross. You don't want to be gross, do you?"