Web Dev Beware - MS Javascript Holes
Monday 7th April, 2014
Just a short piece on using the web viewer in FileMaker one Windows.
The Web viewer uses the installed Microsoft browser, so on Win7 that’s IE 8, probably. Code developed for a modern browser, say on a Mac with Safari is probably more forgiving. For instance:
chart: {
margin: 100,
marginTop: 50,
marginBottom: 60,
}
will be understood, no problem.
But that last trailing comma, will cause IE 8 fits. What IE 8 wants to see is:
chart: {
margin: 100,
marginTop: 50,
marginBottom: 60
}
Yes, it’s correct, and fastidiousness is a fine thing in an interpreter. But it’s irritating.
Slightly less irritating, but easily overlooked, is that IE doesn’t support the object.map()
function. So instead of:
clicks = myChartData.map( function(x) { return x[2]; } ) ;
you need to use jQuery, like so:
clicks = jQuery.map( myChartData, function(x) { return x[2]; } ) ;
Then it should all work just beautifully.
One finally tip (i.e. auto-reminder) is that to stop web viewer borders printing in FileMaker on Windows you need to turn interactivity off.