You are currently browsing the monthly archive for September 2006.

More issues with Atlas and your own client javascript.

Today I stumbled accross another isse of my own JavaScript causing errors with Atlas. Typically you place all your JavaScript in the HEAD of the document. So.. today I added the following function to my JavaScript in the HEAD of the page.

javascript_form_submit

Atlas - Unknown ErrorAfter adding this code, any click on the page that used an Atlas Update Panel, caused the discreet Unknown Error dialog box. After many attempts to discove what the problem may be, I moved the entire function to script tags with-in the BODY of the page. All worked fine, with no Atlas “Unknown Error”.

I decided to test another sceniario, and put all my JavaScript in an external file (I usually wait till I am finished with the page for this step) and included it from with-in the HEAD of the page. Again I tested the page and all worked fine with no Atlas “Unknown Error”.

I thought this error may have something to do with the partial rendering that Atlas is taking care of, but after my second test, I an not so sure any more. Either way, I believe it may be a better practice to put all JavaScript in an external .js file and include it in the HEAD of your page.

Advertisements