Existence is More Than Just True/False
July 19, 2007   link

I learned a valuable lesson this week while hunting down a tricky bug in PopBox, and I feel silly to have not known it already.

In script it's a common task to check an object to see if a property exists on it prior to trying to use that property. If you do any cross-browser work you know exactly what I'm talking about, but for those that might not I'll give you an example by showing you the line I used to check if an image was fully downloaded for display:

var isReady = (objToPop.readyState) ?
   (objToPop.readyState == "complete") :
   ((objToPop.complete) ? (objToPop.complete == true) : true);

For Internet Explorer an image tag has the "readyState" attribute that is set to "complete" when the image is fully downloaded, but Mozilla browsers, and other W3C standard-bearers, use the "complete" attribute.

Testing for existence is fairly simple between the browsers - you just see if the property exists with a simple check like
if (objToPop.readyState) { do something }

This is actually a shorthand way of writing
if (objToPop.readyState != 'undefined') { do something }

But there's a big problem with using the shorthand syntax in this instance on Mozilla browsers. While IE's "readyState" is a string, Mozilla's "complete" is a boolean. In the sample above Mozilla browsers would always return true.

The correct way of checking the image state (in longhand for clarity) would then become this:

var isReady = (typeof objToPop.readyState != 'undefined') ?
   (objToPop.readyState == "complete") :
   ((typeof objToPop.complete != 'undefined') ?
   (objToPop.complete == true) : true);

As you may have guessed I will be releasing another version of PopBox tomorrow with this bug fix included, so all you FireFox fans will finally get to see what the spinner wait icon looks like.

Sad to say, but there was an even larger bug in v2.1 that caused some really bizarre behavior with Mozilla browsers. But that one got fixed too and you should have a much more stable version tomorrow.

Thanks everyone for your feedback! I'm getting a lot of email and I appreciate your kind words. There have been a number of questions regarding functionality choices and tech support, so I will be putting up a FAQ page in the next couple of days also that should go a long way to answering your questions about PopBox.

I'm excited about starting my market/software experiment next week. Stay tuned...


July 16, 2007   link

I'm releasing PopBox 2.1 today. I've put in pretty much every requested feature plus a few I thought of myself and I can't think of what to do with it next. I suppose someone in the user community will come up with something.

It will be nice to get back to writing some articles and not-free software also. PopBox has been a fun project and a good learning experience, but I have a few other software projects that I want to release this year and they're all in a half-finished state. It will be nice to finish them too. Even so - if you have PopBox suggestions I am still open to hearing them.

Here's the list of new features in PopBox 2.1:

  • Added the ability to display a caption for your images. If it's too large to fit on one line it automatically renders with an expanding capability.
  • Added a "pbSrcNL" attribute to the <img> tag that allows for a different image to be used for the Popped image that is NOT preloaded. So if you'd rather the large image download when the user clicks this is the attribute to use.
  • Fixed the stylesheet to display custom cursors in FireFox also.

It may not look like much, but it took some thought to get the caption to work correctly and I didn't have much time during the week to work on it. A couple of bugs were fixed also - one of them fairly significant. You can see the full revision history on the documentation page.

Remember to send me the url where you're using PopBox! When I get enough of them I'll create a page with the list. That's free advertising for you and a nice customer testimonial for me. Win-win baby. Win-win.


FireFox and the Custom Cursor
July 12, 2007   link

I guess FireFox does support custom cursors. Hmmm.

In previous testing of PopBox I just couldn't seem to get the magnifying glass icons to work correctly in FireFox, so I assumed that it just wasn't supported, but the reality is that I was lulled to sleep by Microsoft's excellent documentation.

I mean that in a good way - generally speaking. One of my primary development resources for years has been the MSDN Library, where you can find information on any Windows API and most companion products as well. For example, let's say that I want to see what cursor styles are available for use on an <img> tag. I would fire up my copy of MSDN Library, click "Contents" and navigate right to it:

Web Development -> HTML and CSS -> SDK Documentation -> HTML and DHTML Reference -> Objects -> img -> Styles -> cursor

Among the list of cursors supported in IE is one called "hand," which is the same as the "pointer" cursor used by other browsers. But all the Microsoft examples use "hand" when "pointer" would be cross-browser compatible. I didn't catch that.

So defining my custom cursor class like below didn't work in FireFox. Even though it understood the url cursor it wouldn't render because it bombed on the hand cursor type:

/* incorrect values for cross-browser compatibility */
.PopBoxImageSmall
{
   border: none 0 white;
   cursor: url(http://www.c6software.com/images/magplus.cur), hand;
}

But adding the quotes around the Url (oops) and defining a secondary cursor that FireFox can understand (pointer) made the difference.

/* correct values for cross-browser compatibility */
.PopBoxImageSmall
{
   border: none 0 white;
   cursor: url("http://www.c6software.com/images/magplus.cur"), pointer;
}

I guess I should have figured that Microsoft would gear their documentation toward their own products.

All I can say is that I'll do my best not to fall asleep again. In the meantime, if you're using the default PopBox stylesheet classes you may want to modify the cursor properties.

Speaking of PopBox - I've got a new version with more features and a bug fix or two coming out either tomorrow or Monday, depending on how much time I have for testing. The stylesheet fixes will obviously be in there too...


June 28, 2007   link

PopBox 2.0 is finally here!

From the email I've received people really wanted that true thumbnail image capability so I'm happy to report that it's in there.

I won't repeat myself actually - everything that I said would be in there on Tuesday did make it in, so just scroll down to Tuesday's post if you want the list of new features, or go straight to the PopBox product page.

Slated for the next release is the ability to define a caption for the popped image. I have a couple of ideas and have received 1 or 2 from other PopBox users on how they'd like to see it implemented. If you have any ideas let me know!


PopBox 2.0 Coming This Week
June 26, 2007   link

This is just a heads up that PopBox 2.0 should be coming out in the next couple of days. It is feature complete and I am just doing some compatibility and regression testing prior to calling it done. The documentation is almost finished as well, so barring something unforeseen 2.0 should be out by Friday.

It's much easier to use and the most requested features are all in there. Here's a list of enhancements:

  • Allows for a different image to be used for the thumbnail and Popped image, with built in preload, caching and wait images.
  • No longer need to add the call to Revert to your image tag. It will be called automatically.
  • Added PopBar transparency, which allows you to overlay text on the thumbnail image also.
  • Allows you to display the RevertBar and PopBar above the image or overlaid on the image.

June 08, 2007   link

When I released PopBox a couple of weeks ago the community received it very well and it looks like I may have been able to help out a lot of people. That's great and in part what it's all about.

I did however receive a request for the same feature over and over, and that was for a small "X" or close box in the upper right hand corner of the Popped image to make it obvious to the user how to close it.

I resisted this feature request for days, thinking that no user could truly not figure out how to close an image. It seemed simple enough to me - you click it to open, you click it to close. Since PopBox also has the ability to automatically close the image when the mouse cursor leaves the image I figured I had all the bases covered.

Besides - adding the close box to the upper right corner of the image would be hard.

But the request kept coming in. So I did what any smart man in my position would do: I asked someone smarter - my wife.

Gentlemen, you should all be as lucky as I to have the wife I have. Only go find your own of course. She said to me, "So you don't want to do it because it would be hard?" That pretty much ended the conversation.

Not to be outdone I decided to make my close box the fanciest, most functional, slickest and classy close box I'd ever seen. It's a multi-element transparency with text and an image that really allows you to direct the user as well as being intuitive.

My wife's comment? "You think you're pretty fancy, doncha!" That's all I need.

You can check it out at the PopBox product page, and I've finished the documentation page as well.


May 24, 2007   link

Do you have a web site? Do you display small images that represent larger ones such as "thumbnails"? Or do you need to dynamically move or resize images on the page? Then you need PopBox!

With only a few simple modifications to your web page your thumbnail images will be "popping" out of the screen when visitors click on them instead of reloading a time-consuming second page.

PopBox is an image magnification javascript solution for dynamically resizing your images on your web page, with only 3 simple lines of HTML/Javascript code. And it's free!

I've written up an introductory article on PopBox, or you can go straight to the product page now!


Web Site Back Up - And Faster Than Ever!
May 23, 2007   link

The planned network upgrade went very smoothly today and the web site was down for only a couple of hours from about Noon to 2:00.

My average speeds are now:

  • Download Speed: 9466 kbps (1183.3 KB/sec transfer rate)
  • Upload Speed: 10994 kbps (1374.3 KB/sec transfer rate)

I know that's not a big deal for most businesses with T1s and such, but for running my server from home over fiber DSL that's great!

Product release tomorrow...


Planned Site Outage on May 23
May 22, 2007   link

Due to a planned network upgrade the web site may be down for a couple of hours on Wednesday, May 23 in the afternoon PST. I don't have an exact time or length of outage but I'm excited about the prospect of much faster speeds.

I'm also still on track to release my product on Thursday, so remember to check back!


Product Launch on May 24
May 16, 2007   link

My current internet provider here in CA is SureWest, and I personally haven't had any problems with them. In fact, they have been very easy to work with and have even upgraded my speed once or twice without a price increase which is always nice. Well, they're doing it again.

On May 23 they have scheduled me to get a fiber drop and a bandwidth increase to 1MBps synchronous. The fact that this is a synchronous connection means that my upload speed will be the same as my download speed, which makes a big difference when you run an internet-facing server on my side of the connection. Late next week you should notice a big difference in page responsiveness.

The only downside that I can see is that they tell me I will need a new IP address and could be down for up to 4 hours, so I've decided to delay my product launch until the day after the upgrade so as to avoid any outages so close after launch. I don't really expect a flood of visitors to be trying to get through but I do expect the product to become popular (and not just because it's free) and I'd rather not look flaky.

So if you have a lot of images or screen shots on your web pages be sure to check back on May 24!


Sidetracked
May 11, 2007   link

I've been sidetracked for the last couple of weeks with a completely different product, but I got excited about it and totally went for it. I finished it this morning but I can't release it until the web docs and product page are complete so I'm working on that. It sure takes a long time to produce anything on only an hour or two a day.

I won't get super specific on what it is right now, but I will say that it's a great little javascript library product that will greatly enhance any web page that displays images. Did I mention it's free?

I should be able to release it early next week and then I can get back to my commercial product.


March 31, 2007   link

On the Business of Software site we had a discussion of e-commerce providers where we talked about the good and bad of creating your own e-commerce system vs. going with an established 3rd party provider. I thought it would help if there was a comparison matrix that would allow you to see the costs before you made a choice, since it's difficult to decide between a provider who offers 1.9% + $0.21 per transaction or one who offers 2.1% + $0.19 per transaction.

The numbers obviously depend on lot on your product price, but I've just made it all easy to calculate for you with this handy matrix. It's changed my mind!


Previous   Latest   All   Archive