You are currently browsing the monthly archive for August 2006.

Wow, 3 posts in one day… well, now 4 posts.  🙂

Don’t expect me to keep this up.

Hey, just got a tip from a friend, Steve. This tip will help prevent the issue of double quotes or no double quotes around javascript for the language attribute.

In Visual Studio 2005, go to Tools>Options> Text Editor > HTML > Format > Check both:

  • “Insert attribute value quotes when typing”
  • “Insert attribute value quotes for formatting”

VisualStudioToolsOptions
This will ensure all attribute values, such as the javascript value of the language attribute is always surrounded with quotes.

Thank you Steve.

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

In the past few days I have learned that with Atlas, it makes a difference if you put your CSS style information in a class in an external CSS document or code it inline in the HTML element.

I had been using an Atlas UpdatePanel wrapper around a TreeView server control all inside a DIV tag. The DIV tag was using a CSS class to set the width, height and overflow styles. Durring testing, I noticed that when the tree expanded and the scroll bars apeared, every click of a node in the tree made scrolled the content back to the top of the tree. I had done a similar Atlas/TreeView in another page and it worked just fine. After some further debugging and code comparison line by line, the difference was that in my working example the CSS information was “in-line” with the DIV tag, but my recent code put the CSS style in an external class. So I moved the style from the class to “in-line” and it began to work just fine.

I am not sure if this is another IE bug, CSS bug or an Atlas bug. Either way, quite interesting and thought I would share it.

Also see my post in this thread:
http://forums.asp.net/2/1268514/ShowThread.aspx



Update
:

TreePopUpOverlay

It appears that the CSS can be inline or in external CSS file, it makes no difference, but the real issue was if the class with overflow=auto is inside or outside the Atlas UpdatePannel. IF you have a DIV with a CSS style setting overflow=auto inside the UpdatePannel, every click within that div will set the scroll to the top. IF you have put that DIV right outside the UpdatePannel, then it should work fine.This also goes for any parent/nested UpdatePanels. So, if the UpdatePannel I just refrenced in the last paragraph were nested inside another UpdatePanel, or I at a later date put that UpdatePannel inside another UpdatePanel, it would “break” the proper scrolling function.

So to produce the popup dialog on the right, and have the red X and the [Close] button work in an UpdatePannel, instead of wrapping everything inside another UpdatePannel, I would have to have one UpdatePannel for the red X close button and one UpdatePannel for the [Close] button at the bottom. See code image below.

treepopupoverlay.txt