The Designspace http://thedesignspace.net/ My daily explorations, troubleshooting, solutions and discoveries. en-us ellen@thedesignspace.net Tue, 04 Jun 2013 13:08:53 -0500 HTML 5 Treasure Hunt game framework http://thedesignspace.net/MT2archives/001031.html I'm working on an HTML version of a Flash Treasure Hunt training game I built a couple of years ago. When it's done, this will be more of a flexible framework than a specific game, capable of being used for any of the many situations in healthcare that require finding the right tool, part or medication quickly and accurately. Searchable... Getting and setting data from Captivate 6 for custom integrations http://thedesignspace.net/MT2archives/000992.html We use Captivate with our LMS both as standalone SCORM modules that communicate directly with the LMS, and as embedded quizzes inside custom learning modules. Communication of the Captivate score back to the learning module was done using a trick suggested by Adobe's Andrew Chemey which involved redefining the built-in sendMail function Captivate used to send an email report of... Javascript: use setTimeout() for detecting whether an object or element exists yet http://thedesignspace.net/MT2archives/000990.html This is an example of the use of setTimeout() to detect if an element or object exists yet. In Javascript, timing is crucial. If an element hasn't been loaded or rendered on the page yet, you can't do something with it, so it is necessary to test for the existence of items that take a while to load. This script... Javascript testing for NaN: why doesn't !="NaN" work? http://thedesignspace.net/MT2archives/000918.html A couple of weeks ago, I was working on a custom HTML wrapper for Captivate quizzes that would behave one way if a score were already stored for that quiz, and another if the score were non-existent or zero. So, how best to test for the existence of a score? Usually I test for the existence of a value with... Enable the Debug Menu in Safari http://thedesignspace.net/MT2archives/000892.html I find the new debugging tools in Safari almost as useful as Firebug. There's a Web Inspector that lets you see exactly how the HTML is formed, a Javascript console that lets you see errors and debugging messages written into the code and much more. But to use them you must enable the Debug menu in Safari. Open Safari preferences... Clicking a link results in blank page with "true" in IE7 http://thedesignspace.net/MT2archives/000889.html How to override the !important CSS style attribute using Javascript http://thedesignspace.net/MT2archives/000887.html I've worked on a few projects where a CSS style on some page element has been specified as "!important" and it interferes with the way the page functions. Ordinarily, I would just change the original style, but sometimes I don't have control over the stylesheet or script that is generating the style. One example is a recent project where an... Using the Qualtrics API with PHP and javascript to create custom reports http://thedesignspace.net/MT2archives/000872.html Qualtrics.com is an extraordinarily full-featured online survey application that offers nearly every type of built-in report on your survey data you could ever want. But eventually, there comes a time when nothing but a custom report will do. Or you may want to integrate Qualtrics data into another application. For those times, Qualtrics has an extensive API which allows... Date-controlled random rotating banner script http://thedesignspace.net/MT2archives/000871.html This script text and HTML from an XML listing, based on the end date. It scans through the list, finds the first section with an end-date greater than today's date, then pulls random banner text/HTML from that section. The example shown here uses a flat color banner with white text, but you could also use this same script to generate... A SCORM-Ready Template: PageArray generator http://thedesignspace.net/MT2archives/000869.html dohighlight('pa'); Probably the hardest part of using the SCORM-Ready template is setting up the pageArray listing that generates all the navigation. And now that there are so many new types of quizzes and interactions possible, it can be hard to remember the correct settings.... A SCORM-Ready Template: Captivate Quizzes - Part 1: Introduction http://thedesignspace.net/MT2archives/000860.html Drupal: imagepicker / openWYSIWYG module incompatibility fix http://thedesignspace.net/MT2archives/000854.html A site I administer uses the openWYSIWYG rich text editor module as the default input format for most users. Like other rich text editors, openWYSIWYG makes it possible for anyone to add styles and colors to their posts, including tables, images, links and more. The openWYSIWYG interface... Make the console.log() command IE-8 compatible http://thedesignspace.net/MT2archives/000839.html I often use the command console.log() to trace the execution of my javascript functions in Firebug's or Safari's consoles. The only problem is, Internet Explorer doesn't understand console.log() and moreover, it doesn't error out gracefully. It stops the script execution. As a result, it was necessary to be very careful to turn off the console.log() statements whenever a script goes... Enhanced RSS Display script in classic ASP http://thedesignspace.net/MT2archives/000831.html Drupal YUI Rich Text Editor: Set maximum image dimensions on uploaded images http://thedesignspace.net/MT2archives/000822.html The search for the perfect WYSIWYG text editor in Drupal goes on. The best I've seen yet is YUI Rich Text Editor, but it still has some serious browser incompatibilities and usability problems. One significant is that there is nothing stopping users from upload a huge image, and not resizing it down using the provided resizing tools. Now that just...