InstaCalc Widget/Gadget/Shmudgit
October 20th, 2006
I'm currently looking into ways to create InstaCalc widgets/gadgets/plugins (you know what I mean) for your website. There's a bunch of platforms out there:
- Google Gadgets
- Windows Live Gadgets
- Embed object tags like YouTube. I previously made a simple version to do this, and want to see if there's a better platform.
- Plain ol' static HTML to stick onto your site: fast and simple.
I'm a newcomer to this space and will be researching the various options - I'd love to hear any experiences (good or bad) that people have had in this area.
Sure, the easy answer is to "build 'em all!" but time and energy are usually finite resources.
UPDATE (10/30): Embeddable InstaCalc is alive! Click the "embed" link on any page for the code you need and a live preview. Here's an example BMI calculation.
I've chosen option E), none of the above. I decided to build a system in the style of adwords: a bit of JavaScript that you insert into your site, something like this (script tags intentionally broken):
<scrip t>
instacalc_embed_url = 'http://instacalc.com/?d=blah...';
instacalc_embed_height = 300;
</scrip t>
<scrip t src="http://instacalc.com/javascripts/embed.js"></scrip t>
Here's why I went with this approach:
- Entirely updateable on the backend. If there are any bugs in the layout, I can fix it on my end.
- Including script tags should be familiar to any Adwords user. Also, the code is smaller since there aren't table tags, etc.
- If InstaCalc is down, the script will not be loaded and nothing will be added to the page. This feature was key - including an IFrame or Object directly could have bad consequences if the site was not available (such as an ugly 404 message in the middle of the page!). Now that is not an issue - any ugliness comes from my layout, or your formulas
.
Embeddable formulas are officially open for business - any feedback on your experience is welcome.
Subscribe (RSS)
November 17th, 2006 at 1:48 am
Hey! You should definitely build Windows Live gadgets. The SDK is here: http://microsoftgadgets.com/livesdk/index.htm
And you can basically embed a simple webpage inside a gadget. Let me know if you have questions
One other thing - a feature request for ya - it would be GREAT to be able to add notes for specific lines in instacalc. For example, I may want to make a mental note to myself why a particular value is interesting or where I got it from, etc..
November 20th, 2006 at 3:11 pm
Thanks for the note Mira - I’ll definitely look into the windows live gadget SDK
If you’d like to leave a note to yourself, you can leave a comment on a line (// text here). A bit geeky, I realize, but seems to work for most people.
Also, you can leave a more detailed note at the top of the equation if you want to link to background work, other pages, etc.
December 5th, 2006 at 4:12 pm
Example Google gadget at http://alphajuliet.com/lab/instacalc.xml
December 7th, 2006 at 12:44 am
I just blogged this on my site. I also tried to embed the script, but for some reason it wouldn’t work. I use WordPress, and attempted to do so with the rich text editor both turned on and turned off. It wouldn’t show up on the page, even when I tried to embed it in the html. Any suggestions for WordPress users?
Oh, I got it to work just fine on my sidebar…I didn’t have enough real estate on that side to make it work, though.
December 7th, 2006 at 1:11 am
@AJ: Thanks for the example!
@Rick: I appreciate the post! I think Wordpress may add
tags inside the javascript. To help avoid this, I’m coming out with a raw HTML version you can use instead (today/tomorrow).
I’ve had a few requests to make a narrow version of InstaCalc for blogs/Firefox sidebar, I appreciate the feedback.
Thanks for writing!
December 10th, 2006 at 5:23 pm
Hey Kalid, watch the versioning with the embedded scripts. As you can see, all the 0.6 ones on your page have stopped working. I’ve updated my Google gadget example to 0.8 but it should be friendlier to older versions.
Cheers,
A.
December 10th, 2006 at 8:37 pm
D’oh, my mistake! Thanks AJ, I just fixed the issue. I changed some of the locations using rewrite rules, and I may have had a cached version. I appreciate the help!