Firefox 3 drop down list disables on postback with update panel

We came across a weird problem a few weeks ago where we were using an UpdatePanel through ASP.NET AJAX (.Net Framework 3.5 SP1) with an asp:dropdownlist on that page.  When the update panel did a post back using ajax the drop down lists stopped working.  You could click on the select list but they would not drop down with any options.  This only happened in Firefox 3, no other FF version or Internet Explorer.

Through ages of google searching we found a work around online, adding a window.setTimeout() around the alert box, eg:

ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "validationAlert", "window.setTimeout(\"alert('Just testing')\", 0);", true);

Hope this saves some other people time and heart ache.

About Campo

A Coffee fueled software developer from Brisbane, Australia.
This entry was posted in .Net, C#, Coding. Bookmark the permalink.

5 Responses to Firefox 3 drop down list disables on postback with update panel

  1. Pedro says:

    It worked, but if a didn’t want a message? How I do?

  2. Campo says:

    The alert was just an example, you can replace alert(‘Just testing’) with any JavaScript code you want to run.

  3. Pedro says:

    I tried with another JS code, and it didn’t worked!

  4. Campo says:

    Hi Pedro,

    Try posting a code example and the problem you’re having on stackoverflow.com. This is a great community and they’re very fast at posting helpful information.

    Cheers

  5. Pedro says:

    Ok! Thanks for the help, Campo!!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>