localendar Forums Homepage

Print at Aug 26, 2025, 8:18:43 AM View all posts in this thread on one page
Posted by holytrinitypottstown at Aug 10, 2005, 5:42:16 PM
Problem solved? ... all the weird JavaScript errors/oddities that people have been having
Ever since I started using your site, I've had the same problems that many other users have reported (default date is Jan 1, 2000...also many event details are lost when trying to edit.)

I also have been getting a Javascript exception when loading any add/edit page:

Line: 1043
Char: 1
Error: Access is denied.
Code: 0
URL: http://localendar.com/elsie?DAM=EventEditor&event_id=7&public_event=Y

It struck me just now that this is probably related. So I traced the initial Click on Add Event into a debugger. The above error happens when your PopulateForm() function attempts to access properties of "document.styleSheets[1]". Even attempting a quick watch on "document.styleSheets[1].rules" yields "Access is denied". The URL of the offending stylesheet is "http://www.localendar.com/css/niftyCorners.css".

So somehow this stylesheet isn't recognized as being in the same security domain as the page/script that is trying to access it. Notice the url I've been using is "localendar.com". The script is trying to access "www.localendar.com". To the browser, this is two different domains, and access will be denied. It would be allowed if it were the other way around (child domains are allowed to access parents'.)

If you haven't reproduced it yet, you are probably using "www". I'll bet if you omit that and type just "localendar.com" you'll see the problem right away.

There may be something you can do on your servers to configure them to see the two as the same domain....another solution is to redirect people to "www" if you detect that they tried to go to "localendar.com".

Sorry for analyzing/intruding. I'm an engineer myself; I can't help it. biggrin

-John B.

Posted by holytrinitypottstown at Aug 10, 2005, 5:45:07 PM
Re: Problem solved? ... all the weird JavaScript errors/oddities that people have been having
BTW the reason this would cause all the other problems is that the script of the current scope (PopulateForm) will halt after an error. Other scripts will continue, so it may not be obvious that there is a script problem...but I guess it's PopulateForm that fills in all the correct dates/etc.

Having said all that....Great job with the calendar. It's very well done.

Posted by support at Aug 12, 2005, 11:06:16 AM
Re: Problem solved? ... all the weird JavaScript errors/oddities that people have been having
Close - the issue isn't specifically related to the domain name, but that was a valuable clue in that it connected 2 seemingly unrelated bugs we've been unable to duplicate.

Thanks for your help: And for your troubles (and helping us find ours), a free Premium Webmaster subscription! biggrin

Of course; I hope this is fixed now for everyone. Comments?
----------------------------------------
Marc Higgins
Support Associate, localendar.com
Follow us on Twitter! http://www.twitter.com/localendar_news


Help! | Cobranding | Legal | Privacy Policy | About localendar.com | Contact Us