The Great Kindle Giveaway

Some good pals of mine are getting into the spirit of giving this holiday season with The Great Kindle Giveaway so I thought I’d help them out a little by posting about it here :). The blog has a lot of articles about writing or books, book reviews and plenty of open discussion. Check them out and subscribe for your chance to win a Kindle II!

HTTPS IE and javascript:void(0);

Well this bit me in the rear for a couple hours today. While doing some maintenance for Westlake Eletronic Supply their webmaster, Chris Bourdon, noticed that on all the HTTPS pages IE8 was giving that wonderfully redesigned (and tricky) security pop-up message informing the user that there are insecure items on the page and asks if you want to view the page without them (yes) or with them (no). We certainly didn’t want that popping up all the time but finding what it was couldn’t have been more difficult. A good addition to the developer tools (F12) would be to point out insecure ‘items’ in pages that should be secure. No no… that would have made things too easy, instead we scoured the HTML and JavaScript source and then pulled out fiddler, as any good webmaster or developer would do, to see if we could track down an actual image or file. No dice.

Needless to say, we’re really expecting to find a “src” attribute who’s value was pointing to a http: location or some javascript/ajax calling an insecure page. Nope and nope, apparently it was all due to one of my favorite scripts, sorttable, adding a javascript:void(0) to a generated script tag to defer script loads (and no, I’m not sure what that means as I’ve never had the need to perform such an insecure thing!). Although this could have been accomplished better in sorttable I have to leave it to IE to pull the “telling me there is a problem but not telling me what that problem is at all or telling me in a way that isn’t as helpful as other browsers that have been around not even half as many years were able to do in very early versions” joke on me. It’s a good one but overplayed almost as much as “I’m on a boat”. You win this time IE *shakes fist*!

jQuery accordion, syntaxhighlighter and searchSuggest added

Well since I’ve been using YUI for the past couple of years I hadn’t paid much attention to jQuery but so far I’m enjoying what seems to be a more streamlined library in general. Both jQuery and YUI have their place in my opinion though. I added the accordion menu to the right with a custom theme and it even let me set a specific section open depending on the page. I had a problem with the accordion jQuery widget and syntaxhighlighter though. I don’t recall exactly what brought me the solution to use beautyOfCode but plugging that right in and changing the html on my code pages seemed to do the trick quite nicely. beautyOfCode is a jQuery plugin that is essentially a wrapper for syntaxhighlighter.

I also added another quick sample to the code section for an AJAX search suggestion drop down I created a couple years back for Westlake Electronic Supply. I haven’t completed an actual search results page yet but for now you can simply enter in words into the search box under the header image and it’ll give you the post which contain those words.

Contextual Menus

After more editing and optimizing I’ve managed to combine the news, about and experience pages into one short (61 lines) PHP page, 3 sub templates (4 lines each) and one SQL table. At times, I do need to actually code things out before I can see patterns develop or see where I can tweak something to fall inline with something else I’ve already made. Fortunately that then made creating the contextual menus much less convoluted and a mere 30 lines of PHP at this point, it may be a little longer after I add the archival links for this news section though.

Next I’ll be putting some code up in the Code section which will also use the new general posting page.

Experience (Why) page completed

Well after a lot of writing and some screen shots I’ve described most of my web development experience on the Why page. I’ve even pulled out a ancient site I created and hosted for a hobby of mine more than 4 years ago, X-Bots.

Portfolio site Started

Well I’ve started to create a portfolio site finally. I’ll use this site to share tips and tricks that I’ve learned over the years and to provide information about the projects I’ve been involved in.

So far I’ve created a little graphics, a bare bones template, css and a simple PHP/MySQL news page from scratch.

Contact (Where) page completed

My telephone number and a contact form are located on this page. Before this I hadn’t utilized the PEAR packages very much but I was able to install the PEAR package manager and add the Mail module to it. I had to use the PEAR::Mail module because the mail server I wanted to use required SMTP auth and SSL. I had an SMTP auth solution already but it didn’t support SSL and since PEAR made it so darn easy I decided to dig into that :). I did have a little trouble installing it at first but the power of Google and good souls floating around in the internets provided articles with solutions!

Now onto the showcase (Why) page of my work!

About (Who) page completed

It includes a short bio about my computer related history, a list of skills relating to web development, my education background and a list of companies I’ve done web development for. I’ve almost completed the contact (Where) page then I will move to the meat of this all, the showcase of my work (Why).

Initial Setup

I had a little trouble with the PHP 5.3 and Apache 2.2.14. I have PHP installed as an Apache module. One of the PHP extensions, php_pgsql.dll, that’s loaded by default in PHP 5.3 was preventing Apache from starting. Luckily I’ve run into that problem before so one by one I commented out the PHP extensions in the php.ini until I discovered php_pgsql.dll was the problem. I didn’t need it anyway so no problem leaving that disabled.

After that I started to notice that whenever I interacted with a variable that was undefined/uninitialized that PHP would fail to produce an page and no error was reported. After a couple hours of researching and updating this old (but reliable) server I switched to using the php-cgi under Apache and I started getting errors reported about the date.timezone directive in the php.ini not being set. The error message indicated that it assumed a timezone for me but once I set it in the php.ini then switched back to loading PHP as an Apache module I was able to interact with undefined/uninitialized variables without ill effect.

Return top