Tiny, ambiguous Spry error in IE

Spry Add comments

Just a little gotcha I came across at work yesterday, thought I'd post more as a reminder for me really.  We had a page using a Spry dataset to generate a sortable table and although it worked perfectly in Internet Explorer and Firefox, IE would show it's "loaded with errors" icon in the status bar.  As usual IE was helpful with it's error message "Error: Expected ':'". 

I assumed that might be because we weren't fully qualifying the Spry data within the Spry:Region, e.g. we were using {fieldName} instead of {dataSetName::fieldName}.  But that wasn't it. 

To cut a long and tedious story short, it was where we were passing a Spry binded field to a function - function({fieldName}).  As the argument was an integer I didn't think it need quotes (and as I said, it still worked in both browsers and IE was the only one to show an error) but when I added single quotes - function('{fieldName}') - IE stopped whining and all carried on working fine.

Not sure if that's a known thing or if it'll help anyone, but it annoyed me for a couple of hours.

2 responses to “Tiny, ambiguous Spry error in IE”

  1. Mark Says:
    Thank you!!! This is exactly what I needed!
  2. Daniel Says:
    Thanks! I too have been struggling with this error.

Leave a Reply





Powered by Mango Blog. Design and Icons by N.Design Studio