开发者

calling java script function from code behind with update panel

开发者 https://www.devze.com 2023-03-09 02:12 出处:网络
Hi i still don\'t know where is problem i have: 开发者_JAVA技巧<input id=\"hiddenFieldProgress\" type=\"hidden\" value=\"12\" />

Hi i still don't know where is problem i have:

开发者_JAVA技巧<input id="hiddenFieldProgress" type="hidden" value="12" />
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">

<asp:UpdatePanel>
<ContentTemplate>
                <script type="text/javascript">
                                         alert("warning");
                        var hiddenFieldProgress = document.getElementById('hiddenFieldProgress').value;
                        $find('MainContent_ProgressControl3').set_percentage(hiddenFieldProgress);
                        }
                </script>

                <pb:ProgressControl ID="ProgressControl3" runat="server" Mode="Manual" Width="200px" />
                <asp:Timer ID="Timer1" runat="server" Interval="3000" ontick="CheckIfQueryAnalyzerIsBussy"></asp:Timer>
                </ContentTemplate>
            </asp:UpdatePanel>

and in code behind

const string script = @"onAbsoluteRadioClick();";
            ScriptManager.RegisterClientScriptBlock(this, typeof(UpdatePanel), "jscript", script,true);

and my progress bar has 0 each time when timer call function, alert is working, but Firefox even do not catch breakpoint in this function


oh i am so stuppied, is because this progress bar is in update panel. i 've been fighting with that 1 h and now looked on it from stack overflow and found solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消