I found another issue using Atlas the other day. I was using Atlas UpdatePanel around a TreeView and had some java-script functions on the page elsewhere. All was going fine Tuesday evening, then Wednesday morning, I started getting a what appeared to be a java-script error message.

Atlas - Unknown Error

When debugging, I was able to confirm that Atlas was working, I could step through my server code and populate the tree, but when execution was back at the browser, I would get this error pop-up “Unknown Error”.

I had made very little changes that morning, but due to closing the file earlier, I was unable to use the Undo function. After much time and testing, I remembered that in the HEAD of the HTML document, I had added another java-script function and noticed that the <script> tag did not have the language set, so I had set language=javascript. In Visual Studio 2005, the context sensitive help is great, and after typing language= it prompts with a choice of languages, and when you choose the language it adds it to your code with out quotes.

Now most of the time I have found that it doesn’t matter if you have quotes or not around your values. But this time it made a big difference. I added the double quotes around javascript and tested the page again, and this time there was no error and everything worked fine.

Intrigued by this finding, I did some more testing and found that if I put the SCRIPT tags with java-script functions just below the BODY tag, it did not matter if I used language=javascript or language=”javascript”, both ways worked just fine with Atlas.

So, in the HEAD of the HTML document, I needed to use language=”javascript”, but in the BODY of the HTML, double quotes didn’t seem to matter.

Also, see my post in this thread:
http://forums.asp.net/thread/1363655.aspx

Advertisements