Q:

Is there a reason this js breaks without the url prefix: www?

When I test this website, some of the javascript breaks and a checkbox won't mark itself when clicked if I'm using the url without the prefix: www.  
It works fine if I do have the prefix there.
I'm not really asking for help on this specific websites problem, but does javascript need the url prefix to work properly?  Is it supposed to happen that some features break when the full url isn't there?

A:

It sounds like something else is going on. Javascript Doesn't break just because the url you accessed doesnt have www prefixed to it.
Your web server could be behaving cause of some whacky setting. You could have some funky rewrite rules going on in your .htaccess file if its Apache your on. Or it could be something in the javascript thats looking for a hardcoded url or something.
So again, the answer would be no. A prefix on a URL does not in itself prevent Javascript from working properly.

