views:

300

answers:

1

I'm using the jQuery dropdown checklist plug-in. When the it gets wired up to a multi-select box, you can see the multi-select render for an instant then the correct looking dropdown shows up. It's noticeable on page load but it's especially ugly on partial postbacks when it flashes the larger multi-select for an instant.

I was thinking I could hide it by adding a beginRequest call to hide and a show on end request but it doesn't work. Is there a way to check when the checklist is finished wiring up such that I can displayed it at that point? I'm having a hard time even hiding the dropdown checklist at all programmatically via javascript.

Any ideas?

Update
So, apparently, this is an IE6 only issue. Problem is, IE6 is the only browser this app is going to run in. The ugliness occurs on page load in even the simplest instance of creating a dropdown checklist. i.e.

$(function() {
    $('#MySelect').dropdownchecklist();
});
+2  A: 

I have the same problem and I just hide the dropdown (i.e. I add style="display:none" to the drop down)... Then when the dropdownchecklist is built it will appear in the correct space.

If you are worried about the loading in of the dropdownchecklist pushing the page down when its loaded, you could put a div around the dropdown with the expected height of the dropdownchecklist in its closed position.

Also if you want to get even more fancy you could render the words "Please wait" next to the hidden dropdown within the div and when the dropdownchecklist is loaded remove the text.

anthonyv
Huh, I guess I was making that more complicated than I need to. I was trying to programmatically hide and show it which doesn't seem to work. This will work. Thanks.
Carter