Archive for the ‘AppJet’ Category

Wufoo Themes Revisited

January 4, 2008

OK our wufoo-ifier is in a little better shape now. Improvements include:

  • Theme preview — updates the Wufoo theme each time you select a new one from the dropdown
  • Logo switcher — offers several icons to replace the “Wufoo” logo in the upper left hand corner.
  • Multiple calendars — supports many date or date/time pop-up calendars on the same form
  • Improved style for required fields — asterisks denoting Required fields now better match Wufoo’s style (still broken in Explorer)
  • Better support for IE, Safari, and Opera

Just as an aside, I needed a way to dynamically generate a callback to Calendar.setup in a way that most browsers would support and AppJet came to the rescue in about 10 lines of code:

/* appjet:version 0.1 */
/* apject:server */
var qs = request.params;
response.setHeader('Content-type', 'text/javascript');
page.setMode("plain");
print(raw(
"""Calendar.setup({inputField : """ +
"\"" + qs.inputId + "\"" +
""", ifFormat : """ +
"\"" + qs.formatString + "\"" +
""", showsTime : true, button : """ +
"\"" + qs.buttonId + "\"" +
""", singleClick : true, step : 1});"""
));

Generating a callback with client-side JavaScript can go something like this:

//...
var queryString = '?inputId=' + escape(inputId) +
'&formatString=' + escape(formatString) +
'&buttonId=' + escape(buttonId) +
'&noCacheIE=' + escape(noCacheIE);
calScript.id = 'calendar-setup-' + jsonIds++;
calScript.src = 'http://calset.appjet.net/' + queryString;
calScript.type = 'text/javascript';
calScript.charset = 'utf-8';
// etc., etc..

No fuss, no muss. More on the woofuifier later.

JSON Export and Google Chart API

December 13, 2007

The AppJet homepage says type some code into a box, and we’ll host your app on our servers which pretty much sums up what they allow you to do.

This app reads JSON from AppJetthis Zoho Creator app and converts the values to call the Google Chart API.

Here’s the source.