View Full Version : ddaccordion in ASP UpdatePanel

03-01-2011, 03:06 PM
We are trying to use DynamicDrive's DDAccordion on an ASP page. Works flawlessly on a standard ASP page. When put inside an UpdatePanel the script no longer works, it seems the script silently terminates (no error whatsoever). To be more precise, it works inside the Update Panel until first updatepanel-postback. Full page postback results in the script working flawlessly once more.

Has any of you ever tried to use this particular script with an UpdatePanel with success?

03-01-2011, 04:03 PM
Very few of us work with ASP, so I'm guessing that no one here has tried exactly what you are describing.

If you need help, please:
1. Post in the right format and in the right location. This section is for general Javascript questions.
Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.
2. Since we aren't immediately familiar with what a UpdatePanel is:
Please post a link to the page on your site that contains the problematic script so we can check it out.

(This is not meant to be a complaint, but if you follow the right format you will get a better response.)

Generally speaking, there is no reason at all that ASP should conflict with Javascript. ASP generates HTML (and Javascript, etc). Then the browser executes whatever ASP generated. They don't interact. There are a few possibilities:
1. Could ASP be reading the Javascript as code? Perhaps if you place it all in an external .js file that will solve the problem.
2. Is an "updatepanel" some sort of active page? Maybe the Javascript doesn't have time to execute if there is already some other process going on (like refreshing).

03-01-2011, 04:22 PM

We'll post at the right place next time for sure.

I should have mentioned that UpdatePanel gives AJAX capability to its contents section, hence the thought that it could interfere with the script somehow.

03-01-2011, 04:55 PM
Then it may very well be interfering. However, still without actually knowing the details of that, we can't help.