0

In the past week, I've trying to debug a calendar-view widget and I've come across an error that has left me scratching my head for a few days now.

Here's the gist of what the problem:

Every time I click any clickable object in the view, the browser's console give's me this error:

Uncaught SyntaxError: Unexpected end of input VM131:1

Picture of the console's output:

picture of the console's output

When I click on the location the browser list as the source of the error (the VM###:1), I get redirected to a file whose only contents is 'void' on its very first line.

What could be the source of this error?

Update:

I neglected to add a link to somewhere the error could be seen so here's a link to a site that tries to utilize the calendar widget:

http://juanmoo.scripts.mit.edu/timegrid/src/webapp/site/

6
  • Share your code Commented Aug 14, 2017 at 23:02
  • here's a picture of a cat it doesn't help your problem, but it's cute - you've posted the error in the question, a picture of said error is not required What could be the source of this error? - your code could be the source of the error, but we can't tell Commented Aug 14, 2017 at 23:38
  • It is indeed a cute cat although I've seen better. I didn't post a picture of the code earlier because the project is somewhat large and I'm not sure where the error could have originated. Here's a link to a copy of a site that tries to use the widget: juanmoo.scripts.mit.edu/timegrid/src/webapp/site. The error appears after any button in the calendar widget is clicked. Commented Aug 14, 2017 at 23:52
  • VMxxx means that the error is in code that's being loaded dynamically, such as with eval(). Commented Aug 15, 2017 at 0:00
  • What do we have to do at that site to trigger the error? Commented Aug 15, 2017 at 0:01

1 Answer 1

1

It's coming from lines like these:

<a href="javascript:void">Month</a>

and

<a href="javascript:void">Week</a>

void is not a complete Javascript statement. void is an operator, it has a required operand. So for this to be correct it should be:

<a href="javascript:void 0">Month</a>

and

<a href="javascript:void 0">Week</a>

See What does "javascript:void(0)" mean?

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you so much! I'll definitely look into it. If I could ask one more question how did you see where the error was coming from?
I saw that the error happened when I clicked on the Month and Week tabs. I looked at the element and saw the void there. That matched what VMxxx was showing when clicking on the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.