I’ve written previously about the ease of including share buttons in an application, but today I discovered it isn’t that simple. At least with the DiggThis button.
I have a very basic Javascript function called openWindow that I use to open popup windows on request of the user. Variations of this function are commonly used around the net. Mine is as follows:
window.open(theURL,winName,features);
}
Pretty basic, and it does just what you would expect, unless your call to the function occurs after a DiggThis button in your html document. Then it goes all buggered, and opens a blank tab instead of the requested window. Not good!
The Firefox error console tipped me off to the fact that it was the DiggThis button that was causing my woes:
Source File: http://digg.com/js/loader/209/omnidiggthis/eval/K9mPiejfJM1OX4LqpNrfYA%3D%3D
Line: 1
Something was definitely afoot. My openWindow function was certainly defined, as another call to openWindow above the DiggThis button on the same page worked just fine, and if I removed the DiggThis button, the offending openWindow call functioned properly.
So I’ve opted to scale down my DiggThis button to a basic digg submit link on a digg icon such as:
Using the scaled down version is less desirable. The DiggThis script makes the experience more pleasant for the user as it figures out whether or not the story has been previously submitted, and takes them to either the submit page if if hasn’t, or the digg page if it has been submitted. The scaled down way always sends the user to the submit page, so they may submit the story in vein.
Have you encountered this problem? Do you know a work around that is more desirable than the scaled down submit button? I’d love to use a better solution!


One Response
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Continuing the Discussion