Wednesday, November 12, 2014

Javascript Error: Dialog Box Class for Button

Here is the pesky little debugger error I was receiving in IE:
JavaScript critical error at line 71, column 21 in http://blalblah/file.js
SCRIPT1028: Expected identifier, string or number
The good thing is I found the answer on the internet pretty quickly, and thought I would post for future reference.
Here was the problem line:
class: 'btn btn-primary',
text: 'Submit'
Guess, class is a keyword, so you have to enclose it like so:
'class': 'btn btn-primary',
text: 'Submit'
Hope that helps!