views:

798

answers:

3

If I use: OnSelectedIndexChanged like this:

<asp:DropDownList ID="ddl1" AutoPostBack="true"  OnSelectedIndexChanged="Test_SelectedIndexChanged" runat="server"></asp:DropDownList>

UpdatePanel and UpdateProgress work correctly, meaning it shows my little gif etc.

However as soon as I change this to call javascript code, like this:

<asp:DropDownList ID="ddl1" AutoPostBack="true" onchange="selectValues()" runat="server"></asp:DropDownList>

It stops working. The progress doesn't show up. Now, before anyone asks why do I this, it's because I need to call some scripting into the managed code. It has to do with silverlight.

Does anyone have solution to this problem?

A: 

I would guess it's because the progress is hooked up to show when the UpdatePanel is updated.

Does your second drop down trigger the update panel when you select from the list?

You may have to add a OnSelectedIndexChanged event to your drop down that does nothing to trigger the update panel.

You could add some javascript in yout SelectValues() function to show the progress panel, i believe it is simply a div with an image that you could change the css using javascript to visible.

Hope that helps!

Rigobert Song
A: 

I think your javascript is returning false value. So the server side event of dropdown selectedindex change event does not fire as it it not postback whole page.

jalpesh
A: 

if your update panel doesn't refresh, the updateprogress control will not operate. if you try to update something without calling the update of the updatepanel (ie using your own JS) the updateprogress will not work.

Jason