Forum Discussion
Java Script Error
I am trying to send user data back to an LRS and I can't seem to get the information to send. I am getting an uncaught syntax error: missing ) after argument list and the line code is user.js:22
The javascript code is:
sendStatement("answered", "http://adlnet.gov/expapi/verbs/answered", "Choice-A", "http://example.com/choice-a"')
- BenMcKenna-ba88Community Member
Hey Aaron, I assume you're following Devlin Peck's xAPI tutorial?
The only issue I can see from the line of code you posted is a single apostrophe right before the closing bracket.
Try deleting that and try again?
- AaronFiehnCommunity Member
Thanks for responding Ben and yes, I am following his tutorial. The extra apostrophe wasn't there originally, it was something I was trying based upon another discussion that said that sometimes the programs don't know when you are trying to end a statement.
- AaronFiehnCommunity Member
I was able to rewrite all of the JavaScript and XAPI code and it worked.